+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / URLs in Generic Content Items

URLs in Generic Content Items

4 posts, 0 answered
  1. Nagendra
    Nagendra avatar
    28 posts
    Registered:
    07 Jun 2010
    10 Oct 2010
    Link to this post
    Hello,

    We are using Sitefinity 3.7 and have license for the same.

    We are storing our articles in Generic Content. We have created a page and provided Generic Content as the source for the same. We have some articles that have some URLs to external web sites. Now the problem is when the user clicks on the URLs in the articles driven from Generic Content, they are being shown in the same window. This is causing a problem for our users.
    Is there any way where we can make these articles to be shown in a new window?

    Your reply would help us a lot as we are getting many complaints on this from our users.

    Thanks in advance,
    Nagen
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    10 Oct 2010
    Link to this post
    Hello Nagendra,

    You could send target="_blank" to these urls and they will open in a new window.

    <a href="http://www.telerik.com" target="_blank">telerik </a>

    If you want to open entire content item in a new window, you can map ListPageMaster external template to the ContentView control, subscribe for ItemDataBound event of the Repeater and set the fullContent url to open in a new window.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Nagendra
    Nagendra avatar
    28 posts
    Registered:
    07 Jun 2010
    10 Oct 2010
    Link to this post
    Hi Ivan,

    Thanks for the reply. The problem is our data entry operators do not know all these html tags. They just copy articles from some news channel/web sites and paste the same into our CMS database. In this case we can't change the anchors in the articles they copy.

    I am just looking for some custom settings to be done in Generic Content module which can command all anchors to be show in new window.

    Please let me know in case if I am not clear.

    Thanks,
    Ivan
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    11 Oct 2010
    Link to this post
    Hello Nagendra,

    If they just paste the text inside the RadEditor content area, you have to implement a custom filter and call it inside OnClientSubmit. You have to use JavaScript regular expression to match the <a> tags and add target attribute.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered