More in this section

Forums / Developing with Sitefinity / Popup window link in generic content.

Popup window link in generic content.

9 posts, 0 answered
  1. Jodie
    Jodie avatar
    27 posts
    Registered:
    28 May 2009
    24 Aug 2009
    Link to this post
    Hi-ho,

    I'm looking for a simple way for our content editors (Marketing staff) to be able to add popup links to pages within generic content blocks..

    Using the target attribute doesnt work for all browsers, and I understand it's depricated in XHTML as well.

    The end result I'd like in the output is to have a link like:

    < a onclick="window.open('/xtend-dev/popup/dosage/Omega_3_DHA_Fish_Oil.aspx','','height=600,width=600,top=200,left=200,resizable=1,scrollbars=1,status=0')">Link text/image</a> 

    (I don't want the href/sref in the href="" bit as I don't want spiders to find the popup windows.)

    I have tested a few by editing the html and sticking in the onclick manually, but that's going to get painful as we have 200+ ingredients popups that will be linked from 90-100 pages.  There's also a few hundred image popups to handle...  So obviously I'd prefer something in the GUI that I don't have to do for the non-IT savy staff!!!

    Cheers, Chris H.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    25 Aug 2009
    Link to this post
    Hi Chris,

    I think that it would be more easy if you create a ContentItem and use your script as content. Then add this ContentItem as a SharedContent in each GenericContent control. Thus, your marketing department will work with the control interface.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Jodie
    Jodie avatar
    27 posts
    Registered:
    28 May 2009
    25 Aug 2009
    Link to this post
    I don't follow...

    If we've got a page of text, and the marketing staff want to link one word in the middle of it to a popup window, how does a shared content block help me?  I didn't think there was a way to link blocks of shared content into the middle of a generic text block?

    Also, I don't really see that maintaining 300+ blocks of shared content is manageable long term, even if we could link them into the middle of generic content?

    Are you saying there is no easy way to have popup links generated inside Sitefinity generic content blocks?  I can't believe that this is an uncommon request, lots of sites have pop-up windows for 'more information' type things.

    What I'm looking for is the same functionality as this:

    http://www.xtend-life.com/healthconditions/Arthritis.aspx

    Under 'causes' there are four links to popup info windows.  free radicals, glycation, methylation and inflammation  They popup a modal window...

    What I need is the ability of the non technical staff to highlight the text for the link, select a page internal to the website and tick a box to make it a popup.  Can that be done?

    Cheers, Chris H.
  4. Jodie
    Jodie avatar
    27 posts
    Registered:
    28 May 2009
    26 Aug 2009
    Link to this post
    OK....

    thinking about this a bit more.  :-)  (As you do)

    Is ther a relatively simple way to build in something like this:

    http://www.huddletogether.com/projects/lightbox2/

    As I've been put off popup windows by one of our developers...

    We'd want to have textual as well as image popups...

    Cheers, Chris H.
  5. Jodie
    Jodie avatar
    27 posts
    Registered:
    28 May 2009
    26 Aug 2009
    Link to this post
    OK...

    (our test site: )
    http://smtp.xtend-life.com:81/xtend-dev/product/Omega_3_DHA_Fish_Oil.aspx

    The Enlarge Image and View label links work... 

    Just need a solution for the 'Our Promise' and 'Dosage Info' Links...

    (That is our test site, so it probably wont be there in a few days if anyone finds this thread later on...)

    Cheers, Me.
  6. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    28 Aug 2009
    Link to this post
    Hello Chris,

    If I had to to this, I would choose one of the following approaches (most probably the first one)

    1. Extend the Link Manager dialog - implement a checkbox which places an attribute similar how the lightbox do it - rel=[script]. Then you can have a special JavaScript placed on the page, which iterates through all items in the dom-tree, having this attribute. It should handle the click event, and open a new window upon execution. Here is an article on customizing the RadEditor dialogs - http://www.sitefinity.com/support/kb/sitefinity-3-x/how-to-extend-the-custom-radeditor-dialogs.aspx


    The tool should get the selected text, and apply similar attributes to the result html. 

    I hope this helps.

    All the best,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Kieran
    Kieran avatar
    56 posts
    Registered:
    14 Aug 2008
    12 Nov 2009
    Link to this post
    Hey,

    this is exactly what I am looking to do but i am using version 3.6. How would I go about doing this?


    thanks
    Kieran
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    12 Nov 2009
    Link to this post
    Hello Kieran,

    In Sitefinity 3.6 the templates location has not been changed. You should be able to find the templates and modify them as the KB suggests.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    23 Nov 2009
    Link to this post
    Thank you very much for the solution provided in a finished ZIP file.

    Very easy to implent. Maybe in the future it would be possible to have a solution with JS to open a new window which would then be XHTML conform and out-of-the-box.

    Thanks for the service

    Markus
Register for webinar
9 posts, 0 answered