Created
February 11, 2014 16:41
-
-
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.
This file contains hidden or 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
<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