Apache Forrest > Plugins
 
Font size:      

Welcome to the org.apache.forrest.plugin.input.PhotoGallery Plugin

This is documentation for current version v0.7 (More)

input.PhotoGallery Plugin

This plugin creates a photo album from photographs.

The pictures are expected under {project:content.xdocs}/images/gallery/** in folders called preview, small and big.

To view a screen of thumbnails (generated from the preview directory), you need to request an URL in the form of gallery/**/index.html. By default 20 pictures will be displayed. If you have more than 20 then you will need to use an URL in the form of gallery/**/index_X.html (where X is the page number you want to view). See our demo index for an example.

To view a single picture at a size optimised for the delivery mecahnism (generated from the small directory), you need to request an URL in the form of gallery/**/pic_PICTURE_NUMBER.html, where PICTURE_NUMBER is the number of the picture you want to display. See our demo one picture, demo two picture, demo three picture for examples.

To view a single picture at its natural size (generated from the big directory), you need to request an URL in the form of gallery/**/fullPic_PICTURE_NUMBER.html. See our demo one picture, demo two picture, demo three picture for examples.

Note
To create the relevant directory stuctures for your gallery simply run the following script (unix only). We hope to enhance this plugin so that it will automatically create the relevant images for you, but for now you must do it by hand. for i; do echo -n "Converting:" $i "... "; convert -size 100x100 $i -resize 100x100 preview/$i; convert -size 400x400 $i -resize 400x400 small/$i; convert -size 800x800 $i -resize 800x800 big/$i; echo "finished."; done