Lightbox V2 integration with Typo...

Posted by Steve Longdo Tue, 23 May 2006 11:31:00 GMT

It was brought to my attention that I didn't post a lot of detail about integrating Typo with Version 2 of lightbox. I'll attempt to correct that with a quick write up.

Start by downloading the most recent lightbox release. From here we will want to copy the images that are distributed with it into our Typo installation's public/images folder.

Next up is the javascript file and the stylesheet. I have made some slight modifications to the originals to make the image paths non-relative and the additon of links that show in the caption portion of the light box. Grab the following javascript file and put it in your public/javascripts directory. Then get the css file and put it in your public/stylesheets directory.

Final step for usage is to place a couple of lines in your active theme's layout/default.rhtml. Under the <%= page_header %> line place the following two lines:
<%= javascript_include_tag "lightbox-modded"  %>
<%= stylesheet_link_tag "/stylesheets/lightbox" %>
This should get you up and running with lone imgs
<img src="..." rel="lightbox"/>
and/or groups of imgs
<img src="..." rel="lightbox[groupName]"/>
<img src="..." rel="lightbox[groupName]"/>
Comments

Leave a response

Comments