Expand my Community achievements bar.

CQ5.6.1 page dialog - saving to global node

Avatar

Level 1

Hello,

I have a requirement that when an author configure a property on a page (e.g. adstate), this setting should propagate to all other pages in the site.

To do this, I create my dialog field as follow:

<ad_settings jcr:primaryType="cq:Widget" collapsed="{Boolean}true" collapsible="{Boolean}true" title="Advertisement" xtype="dialogfieldset"> <items jcr:primaryType="cq:WidgetCollection"> <adstate jcr:primaryType="cq:Widget" fieldLabel="Advertisement Settings" name="/etc/designs/mysite/jcr:content/adstate" defaultValue="normal" type="radiogroup" xtype="selection"> <options jcr:primaryType="cq:WidgetCollection"> <green jcr:primaryType="nt:unstructured" text="Normal Ad functionality" value="normal"/> <amber jcr:primaryType="nt:unstructured" text="Wrap Ad calls until page has loaded" value="delay"/> <red jcr:primaryType="nt:unstructured" text="Disable All Ads" value="disable"/> </options> </adstate> </items> </ad_settings>

 

So basically, I have the value, adstate, stored in a globally accessible node in:

/etc/designs/mysite/jcr:content/adstate

 

All my pages are able to retrieve this value and behave appropriately, however, when an author access the page dialog, the radio button does not show up with the current setting. It looks as though it has been reset with no option selected, but the page is definitely configured with the correct "adstate".

 

I understand that the dialog only able to see the nodes/properties relative to the page, so I'm just wondering is there other alternative to achieve what I'm trying to do? Or is there some other settings/configuration that can let the page dialog show the current setting?

 

Thanks and Cheers!

0 Replies