Posted by remkovdz on October 2, 2012 at 9:53am
3 followers
Jump to:
| Project: | Colorbox |
| Version: | 7.x-1.3 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi, is is possible to show only specific content from a page in a colorbox when using the colorbox-load colorbox-inline?
For example I have a page with a single line of text. I want ONLY this text to display inside the colorbox, and not my whole page (navigation, footer etc).
Thanks!
Comments
#1
That 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".
#2
Thanks, but when I use that, it shows me the content within the DIV of the current page, not the linked page?
#3
If 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.
#4
Great link, thanks!
#5
#6
I'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