Gallery Transformer

The Gallery transformer provides a simple Picture Gallery addition for Paloose. To see this in action try the gallery at Guinness Park Farm.


The root sitemap needs to have the Gallery Transformer declared as a component:

<map:components> <map:transformers default="xslt"> <map:transformer name="gallery" src="resource://lib/transforming/GalleryTransformer"> <map:parameter name="root" value="context://gallery/"/> <map:parameter name="image-cache" value="context://resources/images/cache/"/> <map:parameter name="max-thumbnail-width" value="150"/> <map:parameter name="max-thumbnail-height" value="150"/> <map:parameter name="resize" value="1"/> <map:parameter name="max-width" value="600"/> <map:parameter name="max-height" value="600"/> </map:transformer> ... </map:transformers>


In order to use the transformer we need to put the following:

<map:match pattern="*.xml"> <map:generate src="context://content/{1}.xml"/> <map:transform type="gallery"/> <map:transform src="context://resources/transforms/gallery2html.xsl"/> <map:serialize/> </map:match>

Note that there is an XSL gallery transformer, gallery2html.xsl. An example and more details can be found on the Gallery example page.

Copyright 2006 – 2017 Hugh Field-Richards. All Rights Reserved.