Adding links to Suite Bar in Office 365

So we want to add few custom links to the Delta suite bar within Office 356. You can either add it to the Script Editor webpart to add these links for single page or add it to the master page if you want so.

Before:

suitebar_before

After:

suitebar_after

 

<script type="text/javascript">    
    
        $(document).ready(function() {
           var addLinks = "<div class='o365cs-nav-O365LinksItem'><div><a title='Google' class='o365button o365cs-nav-navItem o365cs-nav-workloadLink o365cs-spo-topnavLink o365cs-topnavLink' id='O365_MainLink_ShellMail' role='menuitem' aria-disabled='false' aria-selected='false' aria-label='Google' href='http://google.co.uk'><span>Google</span><div class='o365cs-activeLinkIndicator o365cs-nw-b' style='display: none;'></div></a></div><div style='display: none;'></div></div>";

addLinks +=  "<div class='o365cs-nav-O365LinksItem'><div><a title='Bing' class='o365button o365cs-nav-navItem o365cs-nav-workloadLink o365cs-spo-topnavLink o365cs-topnavLink' id='O365_MainLink_secondLink' role='menuitem' aria-disabled='false' aria-selected='false' aria-label='Bing' href='http://bing.co.uk'><span>Bing</span> <div class='o365cs-activeLinkIndicator o365cs-nw-b' style='display:none;'></div></a></div><div style='display: none;'></div></div>";
        $('.o365cs-nav-O365Links div:first').prepend(addLinks);
     });
   </script>
Advertisements

9 thoughts on “Adding links to Suite Bar in Office 365

  1. Thanks for your post! I have master pages linked so I need to edit the master page html-file and that’s why I would like to ask where in that html-file this script needs to be put in? 🙂

      1. Thank you a lot for your help but somehow it is not working. I checked out my masterpage html-file, edited in advanced mode, added your script right before the >/body> tag and saved, checked it in and reloaded my sharepoint page for a few times. No new links on the suitebar. For a week now I’ve been trying to find a solution to add a link in the suitebar, seems to be almost impossible. :/

  2. I guess you are doing it using SPD. Instead go to Site Settings – Master Page Gallery .. download the masterpage.html you want to edit. Add the script before closing BODY tag. Upload the same again and publish it. See if that makes any difference.

    1. Ok I tried to do it like you instructed and the result is same; jQuery is loaded but no links on the suitebar. Not sure what is wrong. Have you tested the script lately if it still works for you? Or has MS changed something so that the script is not working anymore? I’m really grateful for your help! 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s