Lightbox Display
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
About
Use this module to provide yourself with some theming flexibility when using lightbox/modal modules to display nodes including
How it works
This module takes over the default node/xx page callback, first intercepting it to see if there is a lightbox query attached to the url ($_GET['lightbox']), if so it renders the node using a different build mode, allowing one node to be themed differently at node/xx than at node/xx?lightbox=1.
Other than node links
The module also works with 'other than node' links. If you are serving forms in these links, the module knows to remove the ?lightbox=1 from the form action to prevent submission to the unthemed page. Not all forms will work out of the box, if you find one that doesn't post an issue and I'll attempt to include it too.
Achieving a lightbox display
So say you have a link to a node (eg node/3) that you want to show in a lightbox. You need to add the class lightbox_display to the link (beyond the scope of this document), after you've done that this module will rewrite the url to node/3?lightbox=1 using javascript. When your lightbox module (colorbox, thickbox, lightbox2 etc) opens the link, a different node build mode is used and you can customise the page and node template.
The module ships with a page-lightbox to handle most instances and this provides a basic output, as well as degrading gracefully for those users without js (they get the normal template).
You can provide specific overrides for the standard template by copying page-lightbox.tpl.php
from this module into your theme folder and renaming as required eg page-user-lightbox.tpl.php.
More about build modes
With lightbox display you can alter the CCK field display formats for the lightbox/colorbox displays- visit /admin/content/node-type/xxx/display/lightbox_display to choose new CCK formats for your fields when shown at in a modal. Substitute xxx for your content type.
Node templates
The module registers new template suggestions for theming your node as follows
node--lightbox.tpl.php
node-xxx--lightbox.tpl.php where xxx is your content type's machine name
You can copy the file node--lightbox.tpl.php from this module's folder to your theme folder and edit it to suit your desired lightbox output
Page templates
If you are using your lightbox popup with an iframe (eg lightbox2's lightframe mode, colorbox also supports iframes) then the module provides page-node-lightbox.tpl.php, copy it to your theme folder and customise to suit. The version supplied with the module strips out the header, sidebars, logo, tabs etc
as you normally don't want these in your iframe lightbox.
Support
Please use the issue queue.
Integrating with modal modules
Launching, installing and configuration etc of Colorbox, Lightbox2 and Thickbox is beyond the scope of this documents.
