Monday, May 23, 2011

l() with ImageCache and/or Lightbox2 D:6

Simple:

l('', $filepath, $options = array('html' => TRUE));?>
With ImageCache module:

l(theme('imagecache', $preset, $filepath, $alt, $title, $attributes = array()), $filepath$options = array('html' => TRUE));?>
With ImageCache module and Lightbox2 module:

l(theme('imagecache', $preset, $filepath, $alt, $title, $attributes = array()), $filepath, array('attributes' => array('rel' => 'lightbox[roadtrip]'), 'html' => TRUE));#ImageCache provides a formatter function which does the same. To my mind this one here is more simple...?>