Colorbox methods in Drupal

Here is the link to the colorbox documentation.


Here are the quick details.

To load another page either external or internal create your link like :

<a class="colorbox-load" href="/colorbox/form/user_register_form?destination=user&width=500&height=250">Create new account</a>

To load content in an iframe

Add the class "colorbox-load" to the link and build the url like

this "[path]?width=500&height=500&iframe=true" 

Additional example, if you want to colorbox in a video it would look like this

//NID is the node ID of the video node (you_tube_collection)
<a class="colorbox-load" href="/iframe-colorbox/NID?width=500&height=500&iframe=true">Your anchor text here</a>

To load an iframe full of content from a div on the page add the class "colorbox-inline" to the link and build the url like this


In each of these uses the height and width parameters if left out will come from the colorbox admin defaults.