Reputation: 1217
When a dialog created with set of cq:component and xtypes, the node and its properties stored below the page the component added.
If the node and properties has to be added at a different location, say below /content and some specific parent node, how to do it ?
Thank you, Sri
Upvotes: 0
Views: 215
Reputation: 384
As per AEM Design, nodes needs to be created at correct location so that PAR system can identify those nodes and render them. Though, you can add some properties to some other location using listeners. eg. To set some property on page node which you drop a specific component in page, you can add a listener in editconfig and use CQ HTTP POST API to set properties on node
<cq:listeners
jcr:primaryType="cq:EditListenersConfig"
afterinsert="function(path, definition) {
CQ.HTTP.post(CQ.utils.WCM.getPagePath()+"/jcr:content",null,{'./custom_property': 'value'});
this.refreshPage();
}"/>
Upvotes: 0