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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

Equivalent API methods in granite/touch UI

Avatar

Level 6

Hi ,

I am upgrading code to Touch UI as part of that rewriting the listeners as well. One of the requirement needs to get the selected page URL from 2 locations one is from the sites and other from the page edits.

what are the equivalent API methods for these 2  in AEM6.2?

CQ.wcm.SiteAdmin

CQ.HTTP.noCaching(CQ.HTTP.getPath())

Or How can I get the selected page in Touch UI?

Can anyone let me know how I can have the selected current page path in the js?

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

This is a really difficult question as Granite does not necessary have matching APIs from Classic UI.

Here is the complete Granite Reference:

Reference Materials

Also - check Blog - he has written a lot of great Touch UI blog artilces -

Experiencing Adobe Experience Manager - Day CQ: In the blog "Experiencing Adobe Experience Manger - ...

I will see if he has a specific one that can help you!

View solution in original post

4 Replies

Avatar

Level 6

Any luck on this query. It's very urgent.

Avatar

Correct answer by
Level 10

This is a really difficult question as Granite does not necessary have matching APIs from Classic UI.

Here is the complete Granite Reference:

Reference Materials

Also - check Blog - he has written a lot of great Touch UI blog artilces -

Experiencing Adobe Experience Manager - Day CQ: In the blog "Experiencing Adobe Experience Manger - ...

I will see if he has a specific one that can help you!

Avatar

Level 10

"How can I get the selected page in Touch UI?"

Sreekanth - the blog author suggested this:

try

var fSelections = $(".foundation-collection").adaptTo("foundation-selections");

if(fSelections && (fSelections.count() > 1)){

showAlert("Select one asset", 'Error');

return;

}

For eg. http://experience-aem.blogspot.com/2016/11/aem-62-touch-ui-replace-asset-binary-with-aem-asset-or-lo...

In TOuch UI - you can use JQuey selectors.

Avatar

Level 6

Thaks for the suggestions and reply. I am able to resolve it by another way. I will go through those links again to check for the solution.

Thanks