Created
July 16, 2015 17:19
-
-
Save ronnieduke/a77da30f1e20fbaf84d1 to your computer and use it in GitHub Desktop.
Mura Categories Iterator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfoutput> | |
<cfset catList=""> | |
<cfset it=$.content().getCategoriesIterator()> | |
<!--- Only run if there are categories applied to the page ---> | |
<cfif it.hasNext()> | |
<!--- Loop through the categories and append them to the list ---> | |
<cfloop condition="it.hasNext()"> | |
<cfset cat=it.next()> | |
<!--- Append the current category to the list ---> | |
<cfset catList=listAppend(catList,cat)> | |
</cfloop> | |
<!--- Output the final list ---> | |
#catList# | |
</cfif> | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment