I'm looking to move the move/duplicate 'Set an alert on this page' button from the Page tab of the ribbon (.ms-cui-tabContainer) to the section above it next to Share/Follow/Edit (.ms-cui-topBar2) for every page on our site.

I haven't been able to track down the script that fires on that click event. It doesn't look like copying the html and pasting it elsewhere with javascript works.

Any ideas on how this might be done?

  • 1
  • 1
    This is the same as subscribing to a page, as the URL just point to the site pages library GUID and the pages ID. Commented Aug 15, 2017 at 6:07
  • I did not have time to write you an answerr but i just gotta say that's a real clean solution you came up with! Commented Aug 16, 2017 at 6:12

1 Answer 1


So here's how I ended up doing this, combining the advice from Christoffer and another answer to Get Sharepoint page library list id . This will automate creating the alert me link for any page.

var ListID = _spPageContextInfo.pageListId.replace("{", "").replace("}","").replace(/-/g,"%2D");

var AlertLink = "https://yoursharepointsite/_layouts/15/SubNew.aspx?List=" + ListID + "&ID=" + _spPageContextInfo.pageItemId;

document.getElementById("demo").href = AlertLink;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.