Question

I want to add custom link or button in suitebar in master pages - oslo and seattle.

Here:

enter image description here

Was it helpful?

Solution

Ooops my bad... For 2016 as you rightly said we don't have SuiteBarLinks in master page.

Ref link - Edit Suite Bar Links in Sharepoint 2016

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.4.min.js"></script>
<script>
var customLi = "<li class='ms-core-suiteLink'><a class='ms-core-suiteLink-a' target='_blank' href='https://rootsite/SitePages/Home.aspx'>Home</a></li>";
if(jQuery("div#suiteLinksBox").children("ul").length > 0){
        jQuery("div#suiteLinksBox").children("ul").append(customLi);
       }
else {
        jQuery("div#suiteLinksBox").html('<ul class="ms-core-suiteLinkList">' + customLi + '</ul>' )
}
</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top