1

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

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;
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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