Active
Project:
Lightbox2
Version:
6.x-1.11
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 May 2011 at 00:45 UTC
Updated:
20 May 2012 at 21:18 UTC
How do i jump to another node, via a link, in an open lightmodal window? When the user clicks the link, I want the window's contents to be replaced with the linked node's contents.
Sorry if this has been covered before - i was unable to find a reference to it.
Comments
Comment #1
ah0 commentedlooking to do the same,
found any solutions to this?
cheers,
Comment #2
Hunabku commentedWell someone else claims to have solved this back in 2009 by following the suggestion given here.
However i tried following it to the T and i was unable to replace the content in a currently open modal with content from a linked url. Perhaps we have something in our configuration(other modules, etc) that is causing the parent page to go to the linked content instead of it showing up in the modal iframe.
Anyway i solved my issue with some page embedded jQuery. I designed my simple.tpl.php file with the following basic structure:
One of the keys here is the id = "jquery-content-container" that must be assigned to the container div that encompasses all of the content in your simple.tpl.php. Another key is for all links that you want to open in the same modal to have a class = "replace-content".
Hope this helps - sure did take me awhile to figure it out.
Comment #3
ah0 commentedThe solution looks great, I'm going to give it a try...
Thanks aagain,
cheers,
amir