Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

AEM 6.5 - Clientlib is not getting embedded while creating a page

Avatar

Level 7

Hi,

 

I have a Clientlib folder which includes scripts. It was embeded into cq:dialog in page (apps/aaa/components/structure/page) using extraClientlibs->categories.Problem is while page creation , This clientlib doesn't embed.it is embedding after page creation only.How I can embed it while creating the page ?

 

Thanks in advance.

11 Replies

Avatar

Community Advisor

@JakeCham 

Clientlibs you include as part of dialog(cq:dialog) will only load once you open the dialog. Include client lib in page rendering html/jsp or use cq.authoring.editor category to your clientlib.

Avatar

Level 7

Hi @Anudeep_Garnepudi , Thanks for the reply.Script inside clientlib should work on cq dialog properties while creating the pages(apps/aaa/components/structure/page)).in that case what I have to follow ? After creating the page when i go the edit page properties, script already there.only problem is while creating I want that clientlibs to embed on cq:dialog page properties

Avatar

Community Advisor
@JakeCham Try using granite.ui.quickactions category, this will be loaded in create page interface

Avatar

Level 7
@Anudeep_Garnepudi I have tried adding granite.ui.quickactions into extraClientlibs.still not working.

Avatar

Level 7

@Anudeep_Garnepudi granite.ui.quickactions was added inside cq:dialog->extraClientlibs as a value.if it is you asked me to try then it is not working.

Avatar

Community Advisor
@JakeCham Please add category granite.ui.quickactions to your cq:clientLibraryFolder. No need to add that category to your cq:dialog.

Avatar

Level 7
@Anudeep_Garnepudi Thanks a lot. it is working.Can i know the behavior of the granite.ui.quickactions.Is it adding particular client library into page root only ?

Avatar

Community Advisor
@JakeCham The actual behaviour of granite.ui.quickactions is to show/hide the child pages and actions of specific in sites.html. But here we are just using that category to load our clientlib on edit interface. As our client will be loaded as separate as script on to the page(will not be included as part of actual granite.ui.quickactions code) we are good. But make sure your script does not throw any errors.

Avatar

Level 7
@Anudeep_Garnepudi Really appreciate if you can put a link that I can read about granite.ui.quickactions

Avatar

Level 7
Hi @Anudeep_Garnepudi Client lib is getting embedded after adding granite.ui.quickactions category.But you know which event need to be fired in jquery while creating a page.I have tried $(document).on("pagecreate",function(){ but it is not working ?