I have created common dialog properties in the /apps/my-project/component/commondialog/.....items/ ... I want those dialog properties to appear as it is on Content Fragment component.
I tried 2 possible ways but they didn't worked
Solved! Go to Solution.
Views
Replies
Total Likes
hello @Ronnie09
If the new component is an extension of " Content Fragment component.", then use sling:resourceType at the component level. As suggested by @kautuk_sahni @aem1234567
Otherwise, if you intend to reuse a part of dialog, then use
sling:resourceType="granite/ui/components/coral/foundation/include"
How to configure it, is explained in blog.
https://sourcedcode.com/blog/aem/aem-touch-ui-granite-ui-tabs-example-code
For sling override to work, you will need to extend the component and not just dialog. So in your case,
sling:resourcesuperType =
my-project/component/commondialog
You do not need to provide path until dialog. Hope this helps!
You tried to make the common dialog properties appear on the Content Fragment component by setting the sling:resourcesuperType
property to the path of the common dialog properties. However, this didn't work because the sling:resourcesuperType
property only applies to the root node of a component. In other words, it only applies to the node that represents the entire component. The common dialog properties are nested within the component, so the sling:resourcesuperType
property doesn't affect them.
To make the common dialog properties appear on the Content Fragment component, you need to create a new component that inherits from the common dialog properties component. This new component will have all of the same dialog properties as the common dialog properties component, and they will be available in the Content Fragment component.
Here are the steps on how to create a new component that inherits from the common dialog properties component:
/apps/my-project/components
folder.jcr:primaryType
property to cq:Dialog
.sling:resourceSuperType
property to the path of the common dialog properties component.Now, the new component will have all of the same dialog properties as the common dialog properties component. You can use the Content Fragment component to add this new component to your pages.
Views
Replies
Total Likes
hello @Ronnie09
If the new component is an extension of " Content Fragment component.", then use sling:resourceType at the component level. As suggested by @kautuk_sahni @aem1234567
Otherwise, if you intend to reuse a part of dialog, then use
sling:resourceType="granite/ui/components/coral/foundation/include"
How to configure it, is explained in blog.
https://sourcedcode.com/blog/aem/aem-touch-ui-granite-ui-tabs-example-code