Close button on Search Results Item return to search page, not list.

You’ve created an intranet page that searches a specific list.  You have created a custom display template where an end user clicks on the title to see more details.  The default “Close” button (<SharePoint:GoBackButton runat=”server: ControlMode=”Display” ID=”gobackbutton2″/>), if clicked, returns the user to the entire list.  You would prefer the user be returned to the intranet search page, not the list.

To do this…

  1. Open the display template in Notepad++ or SharePoint Designer
  2. Delete the default SharePoint close button and add you own with html code setting the location.href property to the search page.

For example; <input type=”button” value=”close” onclick=”location.href=’http://www.yoursitenamehere.com'”/&gt;

 

Advertisements

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