Skip to content

Instantly share code, notes, and snippets.

@gregmoser
Last active January 4, 2016 14:39
Show Gist options
  • Save gregmoser/8635923 to your computer and use it in GitHub Desktop.
Save gregmoser/8635923 to your computer and use it in GitHub Desktop.
<cfoutput>
<cfscript>
it=$.content().getKidsIterator();
</cfscript>
<cfif it.hasNext()>
<div class="roses-columns">
<div class="fivecolumn">
<cfloop condition="it.hasNext()">
<cfset item=it.next()>
<cfset index=it.getRecordIndex() - 1><!--- Removes the first item is "All" because it has no image and keeps columns correct --->
<cfset productList=$.slatwall.getSmartList('Product')>
<cfset productList.addFilter('contentID',item.getContentID())>
<cfif len(item.getImageURL())>
<div class="column">
<div class="thumbnail">
<a href="#item.getURL()#"><img src="#item.getImageURL(width=170,height=160)#" alt="#item.getTitle()#"></a>
<p><a href="#item.getURL()#">#item.getTitle()#<br>
<span>#productList.getRecordsCount()# Items</span></a>
</p>
</div>
</div>
</cfif>
<cfif index mod 5 eq 0>
<cfif index neq 0>
</div>
<div class="fivecolumn">
</cfif>
</cfif>
</cfloop>
</div>
</div>
</cfif>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment