Search Results in New Tab(Window) in SharePoint 2013

How to open search results in the new windows in SharePoint 2013, currently if I click on it will open on the same result page itself,  how do I achieve this solution? 

Please dont say control + right click..i want new tab automatically when users click on it. I googled but I see solution for the same in SP 2010 but not in SP 2013.

Please he

July 15th, 2015 2:18am

Hi Ram,

If you want to open search Results in new tab , You have to update Item_CommonItem_Body.html Display Template. Search for below line :

var titleHtml = String.format('<a clicktype="{0}" id="{1}" href="{2}" class="ms-srch-item-link" title="{3}" onfocus="{4}" {5}  >{6}</a>',
                                          $htmlEncode(clickType), $htmlEncode(id + Srch.U.Ids.titleLink), $urlHtmlEncode(url), $htmlEncode(ctx.CurrentItem.Title), 
                                          showHoverPanelCallback, appAttribs, Srch.U.trimTitle(title, maxTitleLengthInChars, termsToUse));

and replace it with :

 var titleHtml = String.format('<a clicktype="{0}" id="{1}" href="{2}" class="ms-srch-item-link" title="{3}" onfocus="{4}" {5}  target="_blank">{6}</a>',
                                          $htmlEncode(clickType), $htmlEncode(id + Srch.U.Ids.titleLink), $urlHtmlEncode(url), $htmlEncode(ctx.CurrentItem.Title), 
                                          showHoverPanelCallback, appAttribs, Srch.U.trimTitle(title, maxTitleLengthInChars, termsToUse));

upload it and publish it again. Now search results will open in new tabs.

Thanks,

Lalita

Free Windows Admin Tool Kit Click here and download it now
July 15th, 2015 7:55am

Hi Ram,

If you want to open search Results in new tab , You have to update Item_CommonItem_Body.html Display Template. Search for below line :

var titleHtml = String.format('<a clicktype="{0}" id="{1}" href="{2}" class="ms-srch-item-link" title="{3}" onfocus="{4}" {5}  >{6}</a>',
                                          $htmlEncode(clickType), $htmlEncode(id + Srch.U.Ids.titleLink), $urlHtmlEncode(url), $htmlEncode(ctx.CurrentItem.Title), 
                                          showHoverPanelCallback, appAttribs, Srch.U.trimTitle(title, maxTitleLengthInChars, termsToUse));

and replace it with :

 var titleHtml = String.format('<a clicktype="{0}" id="{1}" href="{2}" class="ms-srch-item-link" title="{3}" onfocus="{4}" {5}  target="_blank">{6}</a>',
                                          $htmlEncode(clickType), $htmlEncode(id + Srch.U.Ids.titleLink), $urlHtmlEncode(url), $htmlEncode(ctx.CurrentItem.Title), 
                                          showHoverPanelCallback, appAttribs, Srch.U.trimTitle(title, maxTitleLengthInChars, termsToUse));

upload it and publish it again. Now search results will open in new tabs.

Thanks,

Lalita

July 15th, 2015 9:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics