Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Display page in popup window

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 4072 Views
  • eguru
    Avatar
    Community Member
    6 Posts

    Display page in popup window Link to this post

    Hi,
    I am wondering if there is a way to display content in a popup window similar to the way the Profile popup is used in the admin section.

    A specific example of what I want do is based on ArticlePage and ArticleHolder from the tutorial. What I would like to do is display a list of articles on a page based on ArticleHolder and when the user clicks the ReadMore... link the ArticlePage is displayed in a popup window rather navigating to the ArticlePage.

    Is it possible to do this?

    Thank you in advance for any help.

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: Display page in popup window Link to this post

    Hey,

    the profile popup in the backend uses an extension of complextablefield, take a look at that if you want this in the content section of the cms, it's pretty common. It lists data in a table, and you can edit/view this in a popup, just like the profile (but only in the cms!)

    However I think you're talking about having some kind of popup in the frontend. AFAIK there's nothing prefab for this, as it's more a javascript thing than a sapphire/cms thing, but there are a lot of javascript frameworks out there that make building this a lot easier, I'm thinking of YUI and Mootools amongst others...

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: Display page in popup window Link to this post

    We've done this internally on a few projects using jQuery + fancybox - http://fancy.klade.lv/ or thickbox http://jquery.com/demo/thickbox/ which both allow html content in a popup. I recommend fancybox. has a nicer design .

    Although using jQuery breaks some client side form validation and it does some werid things to page comments (due to conflicts with prototype) so you should disable prototype (on the frontend) using Requirements()..

    Other then that I bet theres a prototype or mootools version that would do the same!

  • eguru
    Avatar
    Community Member
    6 Posts

    Re: Display page in popup window Link to this post

    Hi

    Thanks for replying. Following your suggestions I have been investigating methods using javascript and came across a lightweight window library on dynamicdrive.com called 'DHTML Window widget' and an extension called 'DHTML Modal Windows'.

    Using this library it is possible to populate a hidden div on a page using an ajax call and then make the div visible. This seems to meet my needs nicely.

    Now to try and port this into SilverStripe. Will let you know how it goes.

    Cheers

  • eguru
    Avatar
    Community Member
    6 Posts

    Re: Display page in popup window Link to this post

    Greetings

    If anybody is interested I have just been experimenting with the 'DHTML Window widget' and it works well. Doesn't seem to cause any problems for Silverstripe.

    Thanks

    4072 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.