fbpx

Company News

How to add Home & Back Button Navigation to all SharePoint 2010 Enterprise Search Site pages

March 13, 2012

I posted this information on the Get The Point Blog some time ago but I’ve had several folks say they didn’t quite succeed at getting it going (they forgot to check in published pages, etc.).  It was here: http://sharepoint.microsoft.com/Blogs/GetThePoint/brainlitterarchive/Lists/Posts/Post.aspx?ID=381

Well, I’ve done one better and posted it on my own blog complete with a video showing how it is done…

Video Link: http://youtu.be/m5_Ey6duiss

How to add Home and Back Button Navigation to all the pages in a SharePoint 2010 Enterprise Search Site

 

This video demonstrates how to:

  1. Start with a blank SharePoint 2010 Enterprise Search Center
  2. Create a content editor web part with the appropriate HTML in it (and below)… You may want to override where ‘home’ is, but the "back" functionality should stay.  As well, it utilizes icons that can be found in every SharePoint installation, but you could of course create your own
  3. Export that content editor web part to your PC as a DWP file so you can reuse it
  4. Import it into your Web Part Gallery (site collection settings, Web Parts) and categorize it for easy reuse
  5. Apply it to the remaining pages that make up the functionality of the Enterprise Search Center
  6. Check In the pages and make them major versions so all of your users can see/use them

The following is the code you will want to paste into your Content Editor Web Part

   1: <br/>   <a href="/"><img class="ms-rtePosition-4" alt="Go Home" src="/_layouts/images/hhome.png" border="0"/></a> <font color="#0072bc"><a href="/">Go Home</a>  </font><a onclick="history.go(-1)" href="#"><img class="ms-rtePosition-4" alt="Go Back" src="/_layouts/images/back.gif" border="0"/></a> <a onclick="history.go(-1)" href="#">Go Back</a><br/><br/>

This has been a popular topic among folks who want to leverage SharePoint Search but find the out of the box minimal.master page unfriendly for getting back to the rest of your SharePoint sites. http://sharepoint.microsoft.com/Blogs/GetThePoint/brainlitterarchive/Lists/Posts/Post.aspx?ID=381

6 Responses

  1. flavio says:

    Hi, Thanks for the post!

    I need to setup the Link “Go Home” merging with the name of the current user.

    Like this:

    http://companyweb/“currentuser”

    Can you help me?

    Thanks

  2. flavio says:

    Hi Keith Tuomi,
    Thank you a lot for you post!!!. It’s not working for me,I think I’m missing something. I’m using web part “Content Editor” to execute this javascript. The hyperlink was created, but it takes me just to my home page, http://companyweb

    This is the code that I past on the content editor:

    function getUserName()
    {
    var thisUser = $().SPServices.SPGetCurrentUser({
    fieldName: “Name”,
    debug: false
    });
    return(thisUser)
    }
    document.getElementById(‘myAnchor’).innerHTML=”http://companyweb/” + getUserName() + “/”;

    http://companyweb/

  3. Keith Tuomi says:

    You will need to ensure that you have a copy of the SPService .JS included in your site and referenced properly. All the details for accomplishing this are on http://spservices.codeplex.com/documentation#general-instructions.

    Additionally, in the original example on my blog post it just modified the anchor text of the hyperlink. To modify the URL as well you would need to change the href attribute of the link as well.

    I updated my blog post on http://yalla.itgroove.net/2012/07/sharepoint-current-username-add-username-to-page/ to include examles of referencing Jquery and SPServices, and the main script now includes the href update.

  4. Sari says:

    Hi … This is really Great, However if you use the seach feature which is on the top bar of Home, you will not get these Home & Go Back links in the result page, and when I’ve tried to edit it, I couldn’t find “Edit Page” Option … would you please give hand in this

    Thank you

  5. Ash says:

    Thanks a lot for this post.

Leave a Reply

Sean Wallbridge

Sean Wallbridge-square-150x150

Beer Me!

Subscribe via Email

Categories

Powered by...

itgroove Corporate Profile
Connect With Us