Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

Reuse parts of dialog.xml

Avatar

Level 3

Hello,

I have a dialog with two tabs that have the exact same properties but they should be saved under different nodes (sibling nodes). Is it possible to have an xml that is being reused for both tabs? I didn't find a way to parameterize the name property such that for tab1, properties are saved under node1 while for tab2 properties are saved under node2.

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

In CRXDE lite -  just copy the nodes from dialog A to dialog B. Then you will have same structure. 

View solution in original post

7 Replies

Avatar

Level 3

you can include reusable part from other dialog as following-

                
<newtab
 jcr:primaryType="cq:Widget"
 path="/apps/common/components/page/common_tab.infinity.json"
 xtype="cqinclude"/>

Avatar

Level 3

Hmm, thanks. However, I know how to include a certain xml part, but if i include it like this, the properties will be saved under the same nodes for tab1 and tab2, because of the "name" properties. So my question was how to make cq store the properties for the two tabs under different nodes, while reusing the same xml?

Avatar

Level 3

I am not sure if that is possible. just curious - why would you want to use the same dialog for manipulating two nodes?

Avatar

Level 3

I have two configurations that happen to have the exact same properties. An author can choose one of those configurations for some pages and the other for other pages.

Avatar

Correct answer by
Level 10

In CRXDE lite -  just copy the nodes from dialog A to dialog B. Then you will have same structure. 

Avatar

Level 3

Yeah, but I was trying to avoid this..there's no reuse if I just copy paste. But it seems that there's no other solution, so in the end I will do this.

Avatar

Level 10

This in my view is the best way. A lot in AEM involves copying nodes from location A to location B and changing various properties in location B.