Restrict Page Properties in Classic UI | Community
Skip to main content
Level 5
December 21, 2020
Solved

Restrict Page Properties in Classic UI

  • December 21, 2020
  • 2 replies
  • 1056 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kunal_Gaba_

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. 

2 replies

shelly-goel
Adobe Employee
Adobe Employee
December 22, 2020
Kunal_Gaba_
Kunal_Gaba_Accepted solution
December 22, 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.