Demo site: http://www.stellapower.net/lightbox2
There are a number of ways to use Lightbox2 functionality and they can be split into two sections - manual and automatic.
The majority of the links at the bottom of this page provide details on how to add custom links to your site which when clicked will open an image, video or web page in a lightbox. This is done through the use of a
rel attribute on the anchor link.
For example to open an image in a lightbox by clicking on a link, you would type something like the following:
<a href="images/image-1.jpg" rel="lightbox" title="my caption">click here!</a>
rel type can be one of the following:
- lightbox for image content
- lightshow for image slideshows
- lightvideo for video content
- lightmodal for inline HTML content. Note this isn't for full web pages, just snippets of HTML content
- lightframe for everything else, including external web pages.
rel type supports different types of content and features. See the links below (particularly How to add inline content) for more details regarding additional configuration options available to control how your lightbox displays.
Lightbox2 integrates with a lot of Drupal modules to automatically add Lightbox2 support. This means there is no need to add
rel="lightbox" to each individual image on your site. The enabling of lightbox support for a particular Drupal module can be easily enabled and configured at
admin/settings/lightbox2/automatic. Details on these configuration options can be found at Lightbox2 - Settings.
CCK imagefield, emfield and filefield are the exception to this - the lightbox functionality for these modules can be enabled per CCK field in your View or custom content type.
The list of modules supported include:
- CCK Imagefield
- CCK Filefield
- Embedded Media Field (emfield)
- Acidfree Albums
- Image Assist
- Brilliant Gallery