Expand my Community achievements bar.

SOLVED

Restrict Page Properties in Classic UI

Avatar

Level 5

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

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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. 

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

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.