Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Show/Hide Document type form field for specific page/s View modes: 
User avatar
Member
Member
p.murray-rocksolid.com - 9/12/2013 7:02:40 PM
   
Show/Hide Document type form field for specific page/s
Hi

Using Kentico V7, I have created a field for a Page (Menu Item) Document Type via Site Manager / Development / Document Types / Page (Menu Items) / Fields

This document type is shared by all the CMS pages in my site, but I would like to be able to only show this Form field in the CMS desk when editing the Home page (CMS Desk / Content/ Home / Form).

I've been attempting to achieve by the 'Visible Condition' on the Document Type Fields properties
e.g., (CurrentDocument.NodeAliasPath == "/Home")

However this causes the field to hide on all pages.

Is there a way to achieve this? (maybe using a different macro condition?)

User avatar
Member
Member
kentico_sandroj - 9/12/2013 8:06:42 PM
   
RE:Show/Hide Document type form field for specific page/s
Hello,

This approach seems to work for me, please let me know if it would be acceptable:
MenuItemName.Value == "Home"

Thanks,
Sandro

User avatar
Member
Member
p.murray-rocksolid.com - 9/12/2013 10:49:00 PM
   
RE:Show/Hide Document type form field for specific page/s
This worked!

Thanks Sandro!!

User avatar
Member
Member
p.murray-rocksolid.com - 9/13/2013 12:54:47 AM
   
RE:Show/Hide Document type form field for specific page/s
Also, would there be a way to do this at the template level? i.e., if there was call to do this on more than one page?

User avatar
Member
Member
kentico_sandroj - 9/13/2013 2:05:20 PM
   
RE:Show/Hide Document type form field for specific page/s
Hello,

I am not sure what exactly you have in mind but if you could provide an example I may have some suggestions. Typically, you can accomplish this with macros and visibility settings but I am not sure how you planned to configure this. If the linked documents do not answer the question please provide a bit more details about the requirement and we will find a solution.

Best Regards,
Sandro