Touch UI - Reuse Dialog Field | Community
Skip to main content
Level 3
April 6, 2017
Solved

Touch UI - Reuse Dialog Field

  • April 6, 2017
  • 5 replies
  • 12825 views

I want to reuse the dialog field from one of the existing component in another component in AEM 6.2 Touch UI.

I know it can be done in Classic UI using xtype=cq:include. Is there a way to solve this problem in Touch UI?

TIA

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 Nupur_Jain

Hi,

Yes, In Touch UI , there is resourceType "granite/ui/components/foundation/include" which is equivalent of cqinclude of classic UI.

Same as classic UI , there is path property whose value is equal to the path which you want to reuse. For ex: you want to reuse the dialog part "/apps/myproject/components/component1/cq:dialog/content/items/tabs/items/advanced" then this is the value to be used for path property. Do make sure not to use ".infinity.json" as it is not required in Touch UI dialogs.

Hope this helps!

Thank you!

Nupur

5 replies

Nupur_Jain
Adobe Employee
Nupur_JainAdobe EmployeeAccepted solution
Adobe Employee
April 6, 2017

Hi,

Yes, In Touch UI , there is resourceType "granite/ui/components/foundation/include" which is equivalent of cqinclude of classic UI.

Same as classic UI , there is path property whose value is equal to the path which you want to reuse. For ex: you want to reuse the dialog part "/apps/myproject/components/component1/cq:dialog/content/items/tabs/items/advanced" then this is the value to be used for path property. Do make sure not to use ".infinity.json" as it is not required in Touch UI dialogs.

Hope this helps!

Thank you!

Nupur

Ratna_Kumar
Level 10
April 6, 2017

Hi

Yes Nupur is right, you can use resourceType as "granite/ui/components/foundation/include" where we use in Classic UI as xtype: cqinclude

Also, in Touch UI, do not use ".infinity.json" as it is not needed. See this below old thread that discusses the same.

//http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__0sdi-in_classic_uidialog.

See this example OOTB snippet in this location /libs/wcm/foundation/components/page/cq:dialog/content/items/tabs/items/basic

Hope this helps

~ Ratna.

December 28, 2017

I have use granite/ui/components/foundation/include to reuse tab in the dialog box. But I want one of the field inside that dialog tab to be different than the one I am getting. Is there any way to do that?

Level 4
February 6, 2018

Me to having this use case, Will it be possible to achieve for hiding some properties or child nodes by include usage?

Rajalakshmi
Level 2
November 6, 2020

Hi @nupur_jain , we can able to reuse only the dialog fields using this solution. But can we reuse the authored values of one component to other reused components, so we don't need to do authoring for all similar reused components multiple times. Is there any solution in AEM 6.5 and can you help in this.

 

Thanks.