Image Gallery Rule

Grey Box Gallery Rule

Try this very simple image gallery rule. Grey box is basically a pop up window that doesn't suck. Just install the existing FarCry Greybox plugin and you are all set. Select the images you want from the image library and display them using Grey Box.


Really simple installation for your project:

Sample Code

Publishing Rule

<cfcomponent displayname="Image Gallery" extends="farcry.core.packages.rules.rules" 
	hint="Displays a collection of selected images as a Gallery."

<cfproperty ftseq="1" ftfieldset="Image Gallery" name="prefix" type="string" default="" hint="Prefix HTML." ftlabel="Prefix HTML" />	
<cfproperty ftseq="2" ftfieldset="Image Gallery" name="aImages" type="array" default="" hint="Array of images to display." fttype="array" ftjoin="dmimage" ftlabel="Collection of Images" />
<cfproperty ftseq="3" ftfieldset="Image Gallery" name="suffix" type="string" default="" hint="Suffix HTML." ftlabel="Suffix HTML" />


Execute Webskin

Create a folder under your project webskin directory called: ./webskin/ruleImageGallery

<cfsetting enablecfoutputonly="true" />
<!--- @@displayname: Image Gallery --->
<!--- @@author: Geoff Bowers --->
<!--- @@hashURL: true --->

<!--- import tag libraries --->
<cfimport taglib="/farcry/core/tags/formtools/" prefix="ft" />
<cfimport taglib="/farcry/plugins/farcrygreybox/tags" prefix="gb" />

<!--- output prefix html --->

<cfloop from="1" to="#arrayLen(stobj.aImages)#" index="i">
	<ft:object objectid="#stobj.aImages[i]#" lfields="thumbnailimage,sourceimage,objectid,alt" format="display" r_stfields="stfields" />
	<gb:imageSet imageurl="#stfields.sourceimage.value#" title="#stfields.alt.value#">
		<cfoutput><img src="#stfields.thumbnailimage.value#" alt="#stfields.alt.value#" /></cfoutput>

<!--- output suffix html --->

<cfsetting enablecfoutputonly="false" />