Posted by JoMaye on

Sorry, I sidetracked us. Is there a way to ask the item list includelet to open external sites in a new tab/window? Thanks :)

Posted by Joe Oldak on

We can do a JavaScript trick to get all redirect pages in Filtered Item Lists to open in a new tab/window, but there isn't a way to make this only happen if the redirect is to an external site. (the Filtered Item List doesn't know where the redirect is going)

The trick would be, in the Raw Header HTML in the theme settings for the site, add a script like this:

<script type="text/javascript">
$(function() {
  $('.teaser.redirect').find('a').attr('target','_blank');
});
</script>

What this is saying is: once the page has loaded, find all links inside teasers for redirect pages, and add target="_blank" to them all.

Hope that helps!

Joe