Adding lightbox support for images
Lightbox plugins allow users to view magnified versions of clicked thumbnails in modal dialogs on the same page. Coupled with easing animations and other attractive effects, they make for engaging viewing.
While there are a number of modules that provide such functionality, we will be looking at the Colorbox plugin and module in this recipe specifically since it is jQuery-based and supports the ImageField
module.
Getting ready
The Colorbox
module can be downloaded and installed from http://drupal.org/project/colorbox. We will also be working on the company node type created earlier in this chapter.
How to do it...
Once enabled, the Colorbox
module can be configured from admin/settings/colorbox
(Home | Administer | Site configuration | Colorbox) as per the following steps:
Set the value of the Image field gallery setting to Per field gallery.
Choose Original image (no preset) for the Imagecache preset field since we are just going to display the original image...