Closed (fixed)
Project:
Colorbox
Version:
7.x-1.3
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2012 at 09:53 UTC
Updated:
29 Jul 2016 at 03:06 UTC
Jump to comment: Most recent
Comments
Comment #1
frjo commentedThat is exactly what "colorbox-inline" is for.
From the README:
Load inline content in a Colorbox:
----------------------------------
Check the "Enable Colorbox inline" option in Colorbox settings.
This enables custom links that can open inline content in a Colorbox.
Inline in this context means some part/tag of the current page, e.g. a div.
Replace "id-of-content" with the id of the tag you want to open.
Add the class "colorbox-inline" to the link and build the url like
this "?width=500&height=500&inline=true#id-of-content".
Comment #2
remkovdz commentedThanks, but when I use that, it shows me the content within the DIV of the current page, not the linked page?
Comment #3
frjo commentedIf you need to show content from another page than the current "colorbox-inline" is not for you.
The function you want is supported by the Colorbox plugin, see here:
https://groups.google.com/d/topic/colorbox/GnEAbkjekMk/discussion
There is no "point and click" support for it added to the Colorbox module yet so you will need to write some JS code yourself.
Comment #4
remkovdz commentedGreat link, thanks!
Comment #5
frjo commentedComment #6
HyperD commentedI'm interested also on this, but the link #3 is not longer reachable.
I cannot add javascript into any page/view due internal policies, thus I'm looking for something feasible with Colorbox
Comment #7
benjus commentedHi there,
I'm trying to show a template inside a colorbox popup in Drupal 7.
The link that call the template is this:
print "<a class='casualty-link colorbox-inline ' href='/timeline/casualties-popup/".$conflict."/".$fullDate."'>$casualties[$currentDayPadded]</a>";Inside the js addede to the tpl I have this line:
$('a.casualty-link').colorbox();But it is not working, open the page in other in another page.
Do you know why?