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



frjo’s picture

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".

remkovdz’s picture

Thanks, but when I use that, it shows me the content within the DIV of the current page, not the linked page?

frjo’s picture

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:


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.

remkovdz’s picture

Great link, thanks!

frjo’s picture

Status:Active» Closed (fixed)
HyperD’s picture

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