Skip to content

Instantly share code, notes, and snippets.

@stevewithington
Created October 10, 2012 17:41
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/3867157 to your computer and use it in GitHub Desktop.
Save stevewithington/3867157 to your computer and use it in GitHub Desktop.
Mura CMS: Simple Iterator Example
<!--- Uber simple Mura CMS Iterator --->
<cfscript>
feed=$.getBean("feed").loadBy(name="Local Index 'Name' Goes Here");
iterator=feed.getIterator();
</cfscript>
<cfif iterator.hasNext()>
<cfoutput>
<h3>Custom Nav</h3>
<ul class="navCustom">
<cfloop condition="iterator.hasNext()">
<cfset item=iterator.next()>
<li>
<a href="#item.getURL()#">#HTMLEditFormat(item.getMenuTitle())#</a>
</li>
</cfloop>
</ul>
</cfoutput>
<cfelse>
<p class="notice">No items match.</p>
</cfif>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment