March 29, 2020
Estimated Post Reading Time ~

Useful Properties of Page Properties Dialog in AEM 6.3

Generally, we used to copy and paste the dialog and don’t understand the meaning of these attributes. Here I am going to explain some of the page properties of dialog which are very useful.

So I am going to walk you through with each and every property in a detailed manner.

1.cq:showOnCreate :
As classic UI is soon going to be deprecated from AEM, and we have started using touch UI for page Creation.
When the author creates a page from sites, this needs to notice that only two tabs are visible in the page properties dialog here.

Fig - Page Properties Dialog at the time page creation


Now the question comes that why only two tabs visible here while in the page properties dialog there are many tabs. The tabs/widgets are not visible in the dialog right now, because if you see in the page properties dialog these tabs are having the property cq:showOnCreate as false.

So this property cq:showOnCreate plays a very important role to show tabs or widgets at the time of page creation. That’s why if you want to author some fields at the time of page creation only, Just add this property with the value true in the tab /widget node. The default value of cq:showOnCreate is true.


Fig - showOnCreate property added in tab node of the dialog

2.cq:hideOnEdit: While editing the page, if you want to hide any property from the page properties dialog, set this value of cq:hideOnEdit as true.
The default value of cq:hideOnEdit is false.


Fig - hideOnEdit property added in widget node of the dialog

Note: If you want to show any widget/tab at the time of page creation and at the time of edit you want to hide it, you can use a combination of cq:showOnCreate(as true) and cq:hideOnEdit(true).

3.allowBulkEdit: Sometimes many pages want to share the same value of a widget(field).So there is no need to go to each and every page individually and change the property. Let suppose the author wants some tags to be shared across multiple pages. You can select more than one page from the sites console and edit the property at all pages. This property enables the fields for bulk editing.

You can only bulk edit the pages:
Share the same resourceType
Are on part of live copy


Fig - allowBulkEdit property added in widget node of the dialog

4.cq-msm-lockable: One of the features built into AEM MSM is the ability to determine which properties of a page are inherited (“rolled out” in AEM terms) from the master site to its child sites (live copies).

Fig - cq-msm-lockable property added in widget node of the dialog


Fig - cq:LiveConfig node added under the live copy

How this property works:
1. This property will create the chain link in the dialog which indicates that these values will be fetched from the master copy.
Note: If the value is not present in the master copy, it will pick its own value.

2. This can be edited if inheritance from the master copy has been canceled.
When cq-msm-lockable has been defined, breaking/closing the chain will interact with MSM in the following way:
The value of cq-msm-lockable can be relative and absolute.

a)Relative (e.g. myProperty or ./myProperty)
It will add and remove the property from cq:propertyInheritanceCancelled.
MSM does not operate with deep properties (e.g. ./image/fileReference), even though the dialog’s logic does. If the chain is opened a rollout of the page will overwrite ./image/fileReference, as the rollout of the image node will not "walk" up to the parent node to check cq:propertyInheritanceCancelled.


Fig - Properties in case of the relative path when inheritance canceled
Note: H2Solutions provide a Hotfix for AEM MSM Inheritance breaking with deep properties problem in the GitHub Repository

b)Absolute (e.g. /myProperty)
Breaking the chain will cancel inheritance by adding the cq:LiveSyncCancelled mixin to ./myProperty and setting cq:isCancelledForChildren to true.
Closing the chain will revert inheritance.

Fig - Properties in case of the absolute path when inheritance canceled

NOTE: When you re-enable inheritance, the live copy page property is not automatically synchronized with the source property. You can manually request a synchronization (rollout configuration) if this is required.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.