More in this section

Forums / General Discussions / Display News/Event/Blog DetailView in Modal

Display News/Event/Blog DetailView in Modal

4 posts, 0 answered
  1. Mark
    Mark avatar
    147 posts
    Registered:
    01 Jun 2010
    22 Jan 2013
    Link to this post

    I'd like to be able to show a list of News/Event/Blog and upon clicking an item to have it display the DetailView in a modal? Has anyone had an experience with this or have any suggestions?

  2. Victor
    Victor avatar
    94 posts
    Registered:
    15 Jun 2011
    23 Jan 2013 in reply to Mark
    Link to this post

    One way we do it is to setup the control like you would normally do (i,e. in the designer have the detail set to open in a new page).  Then client-side call "fancybox" on that anchor link to have it open as a an iframe

  3. Richard
    Richard avatar
    64 posts
    Registered:
    09 Oct 2012
    05 Sep 2013
    Link to this post
    Hey Mark were you able to figure out a way to make this work? This is exactly what I'm looking to be able to do. Any help would be greatly appreciated!

    Thanks!
  4. Mark
    Mark avatar
    147 posts
    Registered:
    01 Jun 2010
    06 Sep 2013
    Link to this post
    Hi Richard,

    You need to include jquery and fancybox on the parent page. Once you have that, include your class, 'fancyIframe' on the link to to your detail page. You'll probably want to create a new modal template with limited styling for your modal detail page.

    Finally, include the script to wire the class to the fancybox.

    $(document).ready(function () {
    $('.fancyboxIframe').fancybox({
            href : $(this).attr('href'),
            type: 'iframe',
            minWidth: 250,
            maxWidth: 960,
            width: 960
        });
    });
4 posts, 0 answered