How to Load TouchUI dialog Specific Clientlibs
For touch UI dialog we can load specific client libs by using extraClientlibs property to the cq:dialog node.
see below snippet
Using extraClientlibs property
cq: dialog: {
jcr: primaryType: "nt:unstructured",
jcr: title: "Page",
extraClientlibs: ["category1","category2"],
mode: "edit",
sling: resourceType: "cq/gui/components/authoring/dialog"
}
Use categories property to load both CSS and JS.
Use js property to load only JS
Use CSS property to load only CSS
Using Granite Resource
Add node to cq:dialog with granite component reference (/libs/granite/ui/components/coral/foundation/includeclientlibs)Use categories property to load both CSS and JS.
Use js property to load only JS
Use CSS property to load only CSS
{
jcr: primaryType: "nt:unstructured",
categories: ["category1","category2"],
sling: resourceType: "/libs/granite/ui/components/coral/foundation/includeclientlibs"
}