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

Forums / Developing with Sitefinity / Need to open news item PDF's in new window

Need to open news item PDF's in new window

8 posts, 0 answered
  1. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    02 Nov 2010
    Link to this post
    Hi Guys,

    I've posted about this topic before and I am not quite sure why you guys are not implementing it by default in SF as it's a very common User Interface experience to open external links in a new tab or window.

    In one of your posts you mentioned 3 years ago that this would be implemented and it's not added yet and I was wondering why it is that you are not building it into SF?

    Could you please let me know how I go about opening PDF files in the News articles in a new page please?

    Thanks,
    James
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Nov 2010
    Link to this post
    Hello James,

    Opening Documents in a new window has been implemented in Sitefinity 3.7 SP3 through LibraryManager of RadEditor control.

    All the best,
    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. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    02 Nov 2010
    Link to this post
    Hi Ivan,

    This is great if I were adding a new document to my news items but the thing is, I now have a multitude of links which link to PDF files and if I now try and edit this, there is no option to open these in a new window.

    Please see attached.

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

    The option is available only when you enter a document. When you click on the link later, this opens another dialog from the LinksManager which uses Sitefinity\Admin\ControlTemplates\Pages\Dialogs\LinksEditorDialog.ascx. Inside the template there is javascript function - insertLink() where you can add attribute to the closeArgument and option for opening the link 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
  5. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    02 Nov 2010
    Link to this post
    Thanks Ivan.

    Can this please be changed for future releases of SF please? This is a fundamental feature because I need more control of whether or not I want to send the user of the site away from my site or just to another tabbed window.

    I think most SF users will agree with this and I have seen many posts about this very topic.

    Thanks in advance.
    James
  6. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    02 Nov 2010
    Link to this post
    Hi Ivan,

    From the LinksEditorDialog.ascx code, it would seem that your solution will only apply the target="_blank" once I close the radWindow. Is my understanding of this correct?

    If this is the case, it does not help me really as I have many many news items I have to go through and open the page and then save it again for the target attribute to take effect?

    Thanks,
    James
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Nov 2010
    Link to this post
    Hi James,

    Then you can use the Replace tool or get all content items by using GetContent method of the ContentManager class and Reg Ex the Content property of IContent object.

    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
  8. James@Nw
    James@Nw avatar
    265 posts
    Registered:
    05 May 2009
    02 Nov 2010
    Link to this post
    Hi Ivan,

    Geez, that is way too complicated for any every day user of Sitefinity to open their links in a new window.

    I will do this now but please, if the target attribute could be added to everything in future releases of SF, I would appreciate it because although I might be able to follow your suggestions, I can bet that the average person with limited html skills will never know how to do this.

    Thanks again for your time, I do appreciate it!

    James
Register for webinar
8 posts, 0 answered