Viewport header URLs opening new tab/window

Comments

4 comments

  • Official comment
    Avatar
    K15t Team (Edited )

    Hi Dan,

    Thanks for reaching out! It sounds like you're using our Help Center Theme. Could I ask if you're using Scroll Viewport on Confluence Server or Confluence Cloud? For Cloud, we are about to release an improvement to make internal links (that is, links to other pages of your Viewport help center) open in the same tab.

    You can use https://k15t.jira.com/browse/VPC-144 to track the progress on the issue.

    However, in your case, when you say 'major sections of our product site', are these pointers to pages in your Scroll Viewport help center or outside of it (external links)?

    Cheers,

    Laura

    Comment actions Permalink
  • Avatar
    Dan Hursh

    I started with the Help Center theme but have made some changes per the model.  This is running on Datacenter.

    In the setup of the CSS I included a set of top line pages we want to focus on.  The side nav is not a 'normal' for the type of work we are doing.  The issue is that when you click on them they open a new browser window (almost like the URL has a target=_blank operator vs a target=_self)

    0
    Comment actions Permalink
  • Avatar
    K15t Team

    If you're using the Help Center Theme you can inject custom JS to override the default link behavior.

    You will have to create a custom JS file with custom code and upload that file to the rest of the theme files. The custom code could look something like this:

    $(document).ready(function(){
      // Make header links open in the same tab
      $('.header__navigation__menu-container--link > a').attr('target', '_self');
      // Make footer links open in the same tab
      $('.footer__links > a').attr('target', '_self');
    });

    Cheers,

    Laura

    0
    Comment actions Permalink
  • Avatar
    Dorte Jacobsen

    Thanks, Laura - this was also a big help for us :-)

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk