Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

What is the purpose of granite.ui.quickactions category and compatibility with AEM 6.5

JakeCham
Level 4
Level 4

Hi Team,

 

I have a  problem of not loading my clientlib while page is still on create state. Once I have added granite.ui.quickactions category to  client lib it is getting loaded to the page when it is still on create state.I got the clue from this forum with the help of Anudeep_Garnepudi.

Here I have some problems

1) granite.ui.quickactions is compatible with AEM 6.5

2) Since I have added granite.ui.quickactions category in to clientlib folder , can't I specifically put where that client library is getting loaded ?

3) though Clientlib is getting loaded still my js is not firing while page  is on create state. After page creations everything works well as expected

4) Is that fine to use granite.ui.quickactions category on purpose of loading a clientlib on page creation ?

 

 

 

1 Accepted Solution
vmadala
Correct answer by
Level 3
Level 3

Hello @JakeCham 

I understand that you want to execute JS code when you clicked on the "create -> page" button. I've achieved this in my local, please see the below steps.

Please let me know if you need more info.

 

1. Overlay the node items from this path, "/libs/wcm/core/content/sites/jcr:content/actions/secondary/create/items", will create a node items node under /apps folder as shown in the screen-1.
2. Create a clientlibs node, with the sling:resourceType is "granite/ui/components/coral/foundation/includeclientlibs" and specify the clientlib, categories with the values as shown in the screen-1.
3. create clientlib folder as shown in the screen-2 and write your JS code as shown in the screenshot.
4. See screen-3 for reference alert.

I hope this method helps you.

 

screen-1screen-1screen-2screen-2screen-3screen-3

Thanks,
Venkat.M

View solution in original post

1 Reply
vmadala
Level 3
Level 3

Hello @JakeCham ,

As per my understanding, You want to load your javascript code during page creation, which is in page properties/editor mode. We've achieved this in our project. Please see below sample  code:
1. Create a clientlib, under page component "/apps/<your-app>/components/structure/page" as shown in the below screenshot.
2. Add "categories" name as shown in the below screenshot.
3. Add "extraClientlibs" propery to the cq:dialog node under the page component.

 

page-editor-script.png

 

 

Let me know if you need more info.

vmadala
Level 3
Level 3

Hello @JakeCham ,

As per my understanding, You want to load your javascript code during page creation, which is in page properties/editor mode. We've achieved this in our project. Please see below sample  code:
1. Create a clientlib, under page component "/apps/<your-app>/components/structure/page" as shown in the below screenshot.
2. Add "categories" name as shown in the below screenshot.
3. Add "extraClientlibs" property to the cq:dialog node under the page component.

 

page-editor-script.png

 

 

Let me know if you need more info.

JakeCham
Level 4
Level 4
Hi vmadala I want to add the clientlib before u press the create button while page creation.What u have suggested is the normal way of adding a clientlib to cqdialog and it is not going to work for my test scenario
vmadala
Correct answer by
Level 3
Level 3

Hello @JakeCham 

I understand that you want to execute JS code when you clicked on the "create -> page" button. I've achieved this in my local, please see the below steps.

Please let me know if you need more info.

 

1. Overlay the node items from this path, "/libs/wcm/core/content/sites/jcr:content/actions/secondary/create/items", will create a node items node under /apps folder as shown in the screen-1.
2. Create a clientlibs node, with the sling:resourceType is "granite/ui/components/coral/foundation/includeclientlibs" and specify the clientlib, categories with the values as shown in the screen-1.
3. create clientlib folder as shown in the screen-2 and write your JS code as shown in the screenshot.
4. See screen-3 for reference alert.

I hope this method helps you.

 

screen-1screen-1screen-2screen-2screen-3screen-3

Thanks,
Venkat.M

View solution in original post