Hub Hack: Open Tiles in a New Window When "Auto Redirect to Item's Canonical URL" is Enabled

Follow

Use this Custom Code snippet to force Tiles to open in a new browser window when clicked.


Warning

Hub Hacks are not official Uberflip features.

Hub Hacks may not work on all Hubs, or may cause unexpected behavior. If you experience issues with a Hub Hack, available support is limited to helping you disable the Hub Hack only.

Important

Hub Hacks are not compatible with Front End V2 Hubs.

If you are not sure if your Hub uses Front End V2, see this article for help.

Details

  • Type: JavaScript
  • Placement: Body Bottom
  • Notes: If you're using the Auto Redirect to Item's Canonical URL option on a Stream, this will open the link in a new browser window when any Tile in the Stream is clicked.

 

Code

<script>
Hubs.onLoad = Hubs.onPageChange = Hubs.onItemsLoaded = function(){
$("a.item-link[data-internal=false]").attr("target", "_blank");
};
</script>
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.