Expand my Community achievements bar.

SOLVED

How to open a link page when user press the button in sidekick?

Avatar

Former Community Member

Hi, I added an button into the sidekick it will open a new page if user press it, so i how to make this click event work?

BTW, i let the sidekick to add new button by the way of modify file sidekick.js, i have no idea to deal with it.

Anyone could help see it? Please told me your solution. Thanks a lot.

[img]sidekick.png[/img]

1 Accepted Solution

Avatar

Correct answer by
Employee

As the link from Sham showed, you don't need to modify sidekick.js. In your JavaScript, add your custom action to CQ.wcm.Sidekick.DEFAULT_ACTIONS.

View solution in original post

4 Replies

Avatar

Former Community Member

Hi Sham,

If developer want to add a button[Add to cart] to all website pages default, it seems only to modify file sidekick.js rather than using clientlib because JS in clientlib just for any page of that specified template, right?

Avatar

Correct answer by
Employee

As the link from Sham showed, you don't need to modify sidekick.js. In your JavaScript, add your custom action to CQ.wcm.Sidekick.DEFAULT_ACTIONS.