Expand my Community achievements bar.

SOLVED

Hide persmission tab in page properties for specific template types

Avatar

Level 8

Hi

I need to hide the permissons tab in page properties for only two template types or for content under /content/area.

I tried the following but that hides the permissions tab for all all pages.

<permissions
jcr:primaryType="nt:unstructured"
sling:orderBefore="analytics"
sling:hideResource="true"/>
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

If you are using the editable template then you can show/hide tabs, page properties from the page design dialog, similar to any other component.



Example : Image core component 

Hide dynamic media field : https://github.com/adobe/aem-core-wcm-components/blob/88b54675e1303adc211b0c29578297cccd082e1b/conte... 
from design dialog : https://github.com/adobe/aem-core-wcm-components/blob/88b54675e1303adc211b0c29578297cccd082e1b/conte... 



Arun Patidar

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

If you are using the editable template then you can show/hide tabs, page properties from the page design dialog, similar to any other component.



Example : Image core component 

Hide dynamic media field : https://github.com/adobe/aem-core-wcm-components/blob/88b54675e1303adc211b0c29578297cccd082e1b/conte... 
from design dialog : https://github.com/adobe/aem-core-wcm-components/blob/88b54675e1303adc211b0c29578297cccd082e1b/conte... 



Arun Patidar

Avatar

Community Advisor

Hi @anasustic 
There is no permission tab but you can find the way to show hide dialog item based from design dialog settings.



Arun Patidar

Avatar

Level 8

Thank you so much @arunpatidar it works as you described.

 

I was able to disable the permissions tab in Page properties like it follows:

 

policies

sling:resourceType="wcm/core/components/policy/policy"
disablePropertiesFeatures="{Boolean}true"

page.html -> _cq_dialog

<permissions
granite:hide="${cqDesign.disablePropertiesFeatures}"
jcr:primaryType="nt:unstructured"
sling:orderBefore="analytics"/>

 

page.html->_cq_design_dialog

<disablePropertiesFeatures
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
fieldDescription="When checked, some page features are disabled."
name="./disablePropertiesFeatures"
text="Disable Page Properties Features"
uncheckedValue="false"
value="{Boolean}true"/>