Reuse parts of dialog.xml | Community
Skip to main content
gabrielav200407
Level 2
November 25, 2015
Solved

Reuse parts of dialog.xml

  • November 25, 2015
  • 7 replies
  • 4421 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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

7 replies

Level 3
November 25, 2015

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"/>
gabrielav200407
Level 2
November 25, 2015

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?

Level 3
November 25, 2015

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

gabrielav200407
Level 2
November 25, 2015

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.

smacdonald2008
smacdonald2008Accepted solution
Level 10
November 25, 2015

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

gabrielav200407
Level 2
November 26, 2015

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.

smacdonald2008
Level 10
November 26, 2015

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.