Sunday, September 13, 2009

Add a Sign Out link on the top-right nav links of the site

Even though we have the SignOut link on the available on the 'Welcome Username' dropdown menu but our client wanted to have it be clearly visible - without requiring to select the 'Welcome Username' dropdown.

A quick search led me to this msdn post. Here is how I implemented this.
  1. Open default.master for the site collection home site. Add the following lines at the desired location on the master page

    <td valign="middle" class="ms-globallinks" style="padding-left:3px; padding-right:6px;">
    <a href="/_layouts/signout.aspx">Sign Out</a></td>
    <td style="padding-left:1px;padding-right:3px;" class="ms-globallinks"></td>

  2. Check-in and approve the master page.
  3. To have this link available on all sites in the site collection we need to inherit this master page for all the subsites. To do this on the site collection home site: go to Site Actions --> Site Settings --> Master Page.
  4. Now select the default.master in the dropdown and check the checkbox “Reset all subsites to inherit this Site Master Page setting” in both Site Master and System Master sections.

No comments:

Post a Comment