Solved! Go to Solution.
Hi @KunalNa1 ,
I would suggest to reuse tabs or containers of the dialog and include them via special resource type. See details below.
Firstly, you have to extract your reusable configuration to a separate place like: /apps/project/components/authoring/dialog/footer.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="nt:unstructured">
<tab_configuration
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
</items>
</tab_configuration>
</jcr:root>
Secondly, you have to include extracted piece of configuration by using sling:resourceType="granite/ui/components/coral/foundation/include".
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Footer"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<tabs
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/tabs"
maximized="{Boolean}true">
<items jcr:primaryType="nt:unstructured">
<configurationtab
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/include"
path="/mnt/overlay/project/components/authoring/dialog/footer/tab_configuration"/>
</items>
</tabs>
</items>
</content>
</jcr:root>
Just use sling:resourceSuperType=<component path which has cq:dialog> on other component property.
Hi @KunalNa1 ,
I would suggest to reuse tabs or containers of the dialog and include them via special resource type. See details below.
Firstly, you have to extract your reusable configuration to a separate place like: /apps/project/components/authoring/dialog/footer.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="nt:unstructured">
<tab_configuration
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
</items>
</tab_configuration>
</jcr:root>
Secondly, you have to include extracted piece of configuration by using sling:resourceType="granite/ui/components/coral/foundation/include".
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Footer"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<tabs
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/tabs"
maximized="{Boolean}true">
<items jcr:primaryType="nt:unstructured">
<configurationtab
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/include"
path="/mnt/overlay/project/components/authoring/dialog/footer/tab_configuration"/>
</items>
</tabs>
</items>
</content>
</jcr:root>
Adobe recommends modular development with emphasis on reusability. You can create multiple components by leveraging same cq:dialog using their sling resourceType and resourceSuperType. You can read more about it over here: https://forums.adobe.com/external-link.jspa?url=http%3A%2F%2Fwem.help.adobe.com%2Fenterprise%2Fen_US...
These super types are also considered when trying to find a script (especially for handling dialog validations). The advantage of resource super types is that they may form a hierarchy of resources where the default resource type sling/servlet/default (used by the default servlets) is effectively the root.
Also - see the SLing docs. This is a good topic to start with:
https://sling.apache.org/documentation/the-sling-engine/url-to-script-resolution.html
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies