Expand my Community achievements bar.

SOLVED

could you please explain what is extraClientlibs ?

Avatar

Level 4

Hi 

To load cq.authoring.dialog specific to our dialog, I have seen a property extraClientLibs needs to be used. But I am not able to understand how to use it.

Could anyone please explain the purpose, use and value to be given for this property extraClientLibs property.

 

Thank you

Best Regards,

Vijaya

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi 

As mentioned by Scott, please have a look at this documentation :- https://docs.adobe.com/docs/en/aem/6-2/develop/components/components-touch-optimized.html

// see below snippet 

cq: dialog: {
 jcr: primaryType: "nt:unstructured",
 jcr: title: "Page",
 extraClientlibs: ["category1","category2"],
 mode: "edit",
 sling: resourceType: "cq/gui/components/authoring/dialog"
}

To have your client library loaded solely for your component dialog (i.e. it will not be loaded for another component) you need to set the property extraClientLibs of your dialog to the category name of the client library you have just created. This is advisable if your client library is quite big and/or your field is specific to that dialog and will not be needed in other dialogs. To have your client library loaded for all dialogs, set the category property of your client library to cq.authoring.dialog. 

I hope this would help you.

~kautuk



Kautuk Sahni

View solution in original post

6 Replies

Avatar

Correct answer by
Administrator

Hi 

As mentioned by Scott, please have a look at this documentation :- https://docs.adobe.com/docs/en/aem/6-2/develop/components/components-touch-optimized.html

// see below snippet 

cq: dialog: {
 jcr: primaryType: "nt:unstructured",
 jcr: title: "Page",
 extraClientlibs: ["category1","category2"],
 mode: "edit",
 sling: resourceType: "cq/gui/components/authoring/dialog"
}

To have your client library loaded solely for your component dialog (i.e. it will not be loaded for another component) you need to set the property extraClientLibs of your dialog to the category name of the client library you have just created. This is advisable if your client library is quite big and/or your field is specific to that dialog and will not be needed in other dialogs. To have your client library loaded for all dialogs, set the category property of your client library to cq.authoring.dialog. 

I hope this would help you.

~kautuk



Kautuk Sahni

Avatar

Level 2

This would be fantastically more useful if Adobe didn't keep entirely retrofitting their url schema. The referenced link bounces to the community.adobe.com root, now. I don't suppose anyone knows where I might find the content that had been resident where it USED to lead?

 

Or, failing that, if you could at least explain what "category1" is supposed to refer to?

 

Say I have a component (`apps/XXXX/components/content/some-component`.) If it is my intention to load a css file exclusive to the cq:dialog contained therein, I add "category1" to...? is this simply the name of a folder contained within `apps/XXXX/clientlibs/`? What do aI name the css file? Or the JS, if applicable?)

Avatar

Level 1

// extraClientlibs property behavior issue.

I have two component. Let say component1 added with extraClientLibs clientlibs1 and component2 added with extraClientLibs clientlibs2.

Now in the same page add component1 and component2.

1. Edit component1 -> only clientlibs1 is loaded

2. Edit component2 -> Both clientlibs1 & clientlibs2 loaded [Without refreshing the page open the component2 after the compoent one]

Avatar

Level 1

ExtraClientlibs is a dialog level property that allows you to include Client libraries like (CSS and JavaScript) in your specific component cq:dialog.