Expand my Community achievements bar.

SOLVED

Unable to reuse RTE and UI settings plugins using sling:resourceType - granite/ui/components/foundation/include

Avatar

Level 1

We have a global dialog which has a a couple of text fields and a RTE which is being referred in multiple components using sling:resourceType - granite/ui/components/foundation/include and path properties. So far it works fine. Now we created the RTE plugins and UI settings as separate nodes and we have referred them within the global dialog for RTE by using sling:resourcesuperType. But it is not picking up the plugins when we edit the component dialogs. Looks like if we use "include" to refer a RTE node which is in turn using slingresourceSuperType to fetch the plugins then it does not seem to work.


Below are the cq dialog xml's:


Component where we have reused the global dialog

<globalTab
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/include"
path="/apps/test/components/base/_globalTab"/>

 _globalTab dialog where we referred the RTE and UI settings plugins

<descriptionText
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/richtext"
fieldDescription="description text"
fieldLabel="description text"
name="./descriptionText"
removeSingleParagraphContainer="{Boolean}true"
required="false"
useFixedInlineToolbar="{Boolean}true">
<rtePlugins
jcr:primaryType="nt:unstructured"
sling:resourceSuperType="/apps/test/components/base/rtePlugins"/>
<uiSettings
jcr:primaryType="nt:unstructured"
sling:resourceSuperType="/apps/test/components/base/uiSettings"/>

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @nalla0109,

I could reproduce the issue you have mentioned and could realize that it is expected with the way "include" granite resource works.(/libs/granite/ui/components/coral/foundation/include/include.jsp)

It works like this

  • Gets the resource from the "path" property - usual way of getting resource from path - resourceResolver.getResource(path)
  • Makes use of ComponentHelper.include method which is equivalent to <sling:include resource="".. />

Reference:

https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/javadoc/co...

With this set up, looks like sling:resourceSuperType is not evaluated and I don't think include within include(instead of sling:resourceSuperType) again would work.

Will check if there is any other possible options for your requirement and update this thread.

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @nalla0109,

I could reproduce the issue you have mentioned and could realize that it is expected with the way "include" granite resource works.(/libs/granite/ui/components/coral/foundation/include/include.jsp)

It works like this

  • Gets the resource from the "path" property - usual way of getting resource from path - resourceResolver.getResource(path)
  • Makes use of ComponentHelper.include method which is equivalent to <sling:include resource="".. />

Reference:

https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/javadoc/co...

With this set up, looks like sling:resourceSuperType is not evaluated and I don't think include within include(instead of sling:resourceSuperType) again would work.

Will check if there is any other possible options for your requirement and update this thread.