AEM 6.2 classic : Add custom button in sidekick to open selector page | Community
Skip to main content
cquser1
Level 7
Sep 7, 2018 4:34 AM UTC
Solved

AEM 6.2 classic : Add custom button in sidekick to open selector page

Hi All,

We have a requirement, wherein we need to add a custom button in sidekick,which should open the current page with 'selector'.

Basically, if I have a page http://localhost:4502/cf#/content/sample/en/300.html , then on clicking that custom button, the current page should open with url http://localhost:4502/cf#/content/sample/en/300.selector.html [may be in a new tab].

Regarding where should that button be placed. Is it easy to create a new tab like thing[like on OOTB sidekicks we have for Page, Information, Versioning etc] and place it there or to add it to any existing ones. Easiest option would do.

Any thoughts/pointers/reference articles on this will be very helpful.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Sep 7, 2018 8:21 AM UTC

Here is an older community article - that Praveen contributed - that talks about how to customize the side kick that may help point you in the correct direction -- Adobe Experience Manager Help | Customizing the Adobe Experience Manager Sidekick to improve the activate process

5 replies

cquser1
cquser1Author
Level 7
Sep 7, 2018 2:29 PM UTC

Hi,

By removing extra code and having below works.

var a,p,pp,url;

a = window.location.hostname;

p = window.location.port;

                       pp = CQ.WCM.getPagePath();

if (pp.indexOf(".selector.html") != -1) {

url = "http://" + a + ":" + p + pp + ".selector.html";

CQ.shared.Util.open(url);

} else {

CQ.Ext.Msg.alert('Selector exists', 'Selector exists on page.');

}

But the condition that if selector.html is present on the url, then show Selector exists else the other condition is not working properly.

Instead of "indexOf" if there is any other method, to be made use of, please let us know.

Translate
cquser1
cquser1Author
Level 7
Sep 7, 2018 9:39 AM UTC

Hi Scott/All,

Looks like am able to get an extra button in my sidekick.

If I have a page  http://localhost:4502/cf#/content/sample/en/300.html, on clicking this button, it should add ".selector" to the url and open the url http://localhost:4502/cf#/content/sample/en/300.selector.html in a new tab.

I need to remove the existing logic and tweak it as per above.

Trying to figure that out.

In case any pointers here, will be helpful.

Translate
smacdonald2008
smacdonald2008Accepted solution
Level 10
Sep 7, 2018 8:21 AM UTC

Here is an older community article - that Praveen contributed - that talks about how to customize the side kick that may help point you in the correct direction -- Adobe Experience Manager Help | Customizing the Adobe Experience Manager Sidekick to improve the activate process

Translate
cquser1
cquser1Author
Level 7
Sep 7, 2018 7:14 AM UTC

Hi,

Classic UI

Translate
edubey
Level 10
Sep 7, 2018 5:49 AM UTC

Are you referring to touch ui or classic ui?

Translate