Skip to main content
gabrielav200407
Level 2
Nov. 25, 2015 8:11 AM UTC
Beantwortet

Reuse parts of dialog.xml

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

Dieses Thema wurde für Antworten geschlossen.
smacdonald2008
Level 10
Nov. 25, 2015 6:00 PM UTC

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

7 Antworten

Level 3
Nov. 25, 2015 8:37 AM UTC

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"/>
Übersetzen
gabrielav200407
Level 2
Nov. 25, 2015 8:50 AM UTC

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?

Übersetzen
Level 3
Nov. 25, 2015 9:08 AM UTC

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

Übersetzen
gabrielav200407
Level 2
Nov. 25, 2015 12:07 PM UTC

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.

Übersetzen
smacdonald2008
Level 10
Nov. 25, 2015 6:00 PM UTC

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

Übersetzen
gabrielav200407
Level 2
Nov. 26, 2015 7:31 AM UTC

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.

Übersetzen
smacdonald2008
Level 10
Nov. 26, 2015 7:51 AM UTC

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.

Übersetzen