Display News/Event/Blog DetailView in Modal

Posted by Community Admin on 03-Aug-2018 13:36

Display News/Event/Blog DetailView in Modal

All Replies

Posted by Community Admin on 22-Jan-2013 00:00

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?

Posted by Community Admin on 23-Jan-2013 00:00

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

Posted by Community Admin on 05-Sep-2013 00:00

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!

Posted by Community Admin on 06-Sep-2013 00:00

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
    );
);

This thread is closed