2

Ive implemented a SharePoint 2013 Farm Wide search for my site collections, and now want the URL's that get returned to open up in a new tab.

Is there a relatively effortless way to do this rather than messing with the display template, or is that the recommended way?

Thanks!

1

Good day!

If this is for a search results webpart (like results.aspx), than what I found easiest was to add a content editor at the bottom of the page and add a little jquery to achieve this. You can use something like this:

<script type="text/javascript">
$(".ms-srch-item-link").attr("target","_blank");
</script>

This jquery will target all hyperlinks that appear in the search results webpart and change their attributes to open in a new tab. No messing with display templates.

0

you can override the default template rather easy - or you could add a jquery script to the search result page that handles the click event.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.