Restrict Page Properties in Classic UI

Avatar

Avatar

v1101

Avatar

v1101

v1101

21-12-2020

Hello -

I have a template which has both cq:dialog and dialog in it. Basically I wanted to show all the cq:dialog properties/tab only for the rootpage (E.g. 10 properties) and shouldn't all the properties for other child pages. i.e. The child pages should only show the required properties (E.g. 5 properties).
If I check the child page properties in classic UI, it should show all 10 properties. Can someone tell me if this can be achieved?

E.g.
cq:dialog - has 10 properties
dialog - has 10 properties

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

kunal23

MVP

Avatar

kunal23

MVP

kunal23
MVP

21-12-2020

In classic UI, the only option is to write some listener or JS logic to achieve this. One option I can think of is that you remove default required field validator in classic UI and write a custom JS validator to validate the fields based on the path of the page. But in this case all properties will be shown to the user but not all will be mandatory. However, it will be less complex than removing properties from the dialog. 

 

In touch UI, you should be able to achieve this easily with custom granite render conditions. Move all the uncommon properties in a separate tab and hide/show that tab using render condition. The render condition will check the path of the page and return true or false for showing or hiding the tab. 

Answers (1)

Answers (1)

Avatar

Avatar

shelly-goel

MVP

Avatar

shelly-goel

MVP

shelly-goel
MVP

21-12-2020

@v1101 

1. You can either try leveraging granite:renderCondition

https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/granite-ui...

http://www.nateyolles.com/blog/2016/07/aem-granite-custom-render-conditions

2. OR can create two different templates for parent page & child pages