Forum Discussion

LainieH's avatar
LainieH
Expert
10 years ago

Community Links: How to make links open in separate window or tab?

I have two questions about links:

 

1. Many users post links in our community to third party sites, such as, http://support.sas.com.   Is it possible for me to configure the community to make all posted links open with <a href="#" target="_blank">link</a>

 

 

2. Is it possible when pasting a community URL into a post to have it display smart text (such as a page description)?

 

thank you,

 

Lainie

 

  • LainieH - This certainly would require a customization, the first one is however a simpler one compared to the 2nd. You would need to add some jQuery to your header to check the links on the page and add the _blank attribute to them. A snippet like this:

     

    $('.lia-message-body-content a').attr("target","_blank")

     

    For the second one, I would say that it could be possible theoretically but you'd need to make some API calls while the user is posting. As soon as the user posts a link, you would need to check for the respective details such as title, description etc. This is similar to what happens in the Jive community.

     

    I hope it helps.