Open Resource Center announcement hyperlink in same tab/window

When creating a Resource Center announcement, markup language is provided that allows you to hyperlink text to any URL. The default behavior seems to open in a new tab. Is there anyway to force that link to open in the same tab? The use case for this would be a link to somewhere within our own application. It gets awkward having two open windows for the product. Is there anyway to use traditional HTMl in this module to achieve the desired behavior?

2

Comments

4 comments
  • Hi Eric Miller,

    Thanks for your great question and sharing in the Community. 

    We have a snippet that you can check out here: 

    1. https://github.com/pendo-io/snippets/tree/master/resourceCenter/resourceCenterOpenURL

    The snippet will trigger a URL to open in a new tab, but you can change the behavior to be in the same tab in line 4 by removing the 'blank' target:

    window.open("https://example.com/",'_blank');  would become window.open("https://example.com/");
     

    Hope this helps!

    0
  • Howard Lio Thanks, but I was looking specifically for info about the Resource Center module called Announcements and including a hyperlink within the announcement that stays in the same tab. That snippet above is for making an entire module into a hyperlink.

    0
  • I'm curious about this as well. Default opens new tab. How to make link from Resource Center announcement  like open in the same window, that's the question.

    0
  • 1 year later...

    Here's a workaround to the lack of control over whether an inline text hyperlink in a Resource Center announcement opens in a new window/tab or not:

    • Add a custom code block to your announcement
    • Use the HTML tab to create your linked text. It could be placed under an existing text block (appearing as a new paragraph line). OR you could just recreate all of your text content in the custom code block and abandon the out of the box text building block.
    • Here's sample code you can use to force a URL to open in the same window/tab. I tested this in a Resource Center announcement and it worked:
      <a href="https://www.youtube.com" target="_self">YT player</a>

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post