Skip to content

Instantly share code, notes, and snippets.

@stevewithington
Created February 11, 2014 16:41
Show Gist options
  • Save stevewithington/8938645 to your computer and use it in GitHub Desktop.
Save stevewithington/8938645 to your computer and use it in GitHub Desktop.
Mura CMS : Simple example of how to get extended attributes from a Mura Content Collection / Local Index / Feed.
<cfscript>
feed=$.getBean("feed").loadBy(name="Local Index/Content Collection 'Name' Goes Here");
iterator=feed.getIterator();
</cfscript>
<cfif feed.getIsNew()>
<p class="alert alert-info">The Feed/Content Collection does not exist.</p>
<cfelseif iterator.hasNext()>
<cfoutput>
<ul>
<cfloop condition="iterator.hasNext()">
<cfset item=iterator.next()>
<li>
<a href="#item.getURL()#">#HTMLEditFormat(item.getValue('menuTitle'))#</a>
<div>#item.getValue('yourExtendedAttributeNameGoesHere')#</div>
</li>
</cfloop>
</ul>
</cfoutput>
<cfelse>
<p class="alert alert-info">No items match.</p>
</cfif>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment