sling:resourceSupertype not working with include | Community
Skip to main content
July 14, 2022

sling:resourceSupertype not working with include

  • July 14, 2022
  • 1 reply
  • 2406 views

Hello everyone,

 

I have a tab that is included in the dialog via granite/ui/components/coral/foundation/include, in this tab I have placed a richtext component and I created a node in which are placed rtePlugins and uiSettings that I include in the richtext via sling:resourceSupertype. 

Unfortunately, when I open the dialog, in the richtext there are not showed the custom rtePlugins and uiSettings that I defined in my node, but the default ones are showed. 

 

I ran 3 tests:
Dialog tab handled with sling:resourceType=granite/ui/components/coral/foundation/include
A) Richtext with rtePlugins and uiSettings explicit --> working
B) Richtext with rtePlugins and uiSettings included via resourceSuperType --> not working
Dialog tab explicit in the dialog
C) Richtext with rtePlugins and uiSettings made explicit --> working
D) Richtext with rtePlugins and uiSettings included via resourceSuperType --> working

Debugging the js /libs/clientlibs/granite/richtext.js we notice that at line 39223 in case B, the config variable is not resolved, below are the screens for cases A, C, D, and for case B

Test case B

 

 

Test case A,C,D

 

 

 

Does anyone have any idea how to fix this? Seems that the config object does not resolve sling:resourceSuperType within a  granite/ui/components/coral/foundation/include.

I need to use this approach (or similar) in order to have:
- Better reading of tabs
- Limiting the code of richtext configurations (in our dialog we have many occurences of richtext).

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

1 reply

arunpatidar
Community Advisor
Community Advisor
July 15, 2022
July 18, 2022

Hello Arun,

Thanks for your help, I checked the article you linked, but unfortunately I didn't find it very helpful. 
My problem is that the sling:resourceSupertype seems to not be working when I use it in a tab included in the dialog via granite/ui/components/coral/foundation/include, so I can't define a unique node with rtePlugins and uiSettings, I have to define them directly in every rte I'm declaring in the dialog.
Is it a known issue with AEM? Any suggestion on alternative ways I can choose?

Thanks in advance,
Mariano.

arunpatidar
Community Advisor
Community Advisor
July 18, 2022

Could you please share a sample package with me, I can try and find something.

Arun Patidar