Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments

sling:resourceSupertype not working with include

Avatar

Level 1

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

Mariano2_0-1657800806178.png

 

 

Test case A,C,D

Mariano2_1-1657800806194.png

 

 

 

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).

6 Replies

Avatar

Level 1

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.

Avatar

Community Advisor

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

Avatar

Level 1

Hello,

You can see a sample content here. Please let me know if you can access the link.

I created a page with 2 components:

  • one is called "TEST COMPONENT WITH INCLUDE", in which I inserted a tab with a richtext via include, in this case, as you can see, the custom rte plugins are not visible
  • the other component is called "TEST COMPONENT WITHOUT INCLUDE", in this component the same tab is declared directly in the component and the custom rte plugins are visible

Best regards,

Mariano

Avatar

Community Advisor

Hi,

I have tried this and it doesn't work with include but sling resource merger it does.

Avatar

Level 1

Hello,

Thanks for helping me, could you explain more how did you do this? Did you include the tab in the dialog via sling:resourceSuperType?