Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevewithington/4531103 to your computer and use it in GitHub Desktop.
Save stevewithington/4531103 to your computer and use it in GitHub Desktop.
<cfscript>
//Get current content's category assignments
rsCategories=$.content().getCategoriesQuery();
//Build a feed of images with matching categories
images=$.getBean("feed")
.setCategoryID( valueList(rsCategories.categoryID) )
.addParam(field='tcontent.type',condition="EQ",criteria='File')
.addParam(field='tfiles.fileEXT',condition="in",criteria='jpg,png,gif,jpeg')
.getIterator();
</cfscript>
<!--- Output return images--->
<cfoutput>
<cfloop condition="images.hasNext()">
<img src="#images.next().getImageURL(size='small')#"/><br/>
</cfloop>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment