Skip to content

Instantly share code, notes, and snippets.

@stevewithington
Created August 8, 2014 00:08
Show Gist options
  • Save stevewithington/aae2e65c6f39c981735b to your computer and use it in GitHub Desktop.
Save stevewithington/aae2e65c6f39c981735b to your computer and use it in GitHub Desktop.
Mura CMS : A Custom Primary Nav Example
<cfscript>
feed = $.getBean('feed')
.setMaxItems(0)
.setNextN(0)
.setSortBy('orderno')
.setSortDirection('asc')
.addParam(
relationship='AND'
,field='tcontent.parentid'
,dataType='varchar'
,criteria='00000000000000000000000000000000001'
,condition='EQUALS'
);
it = feed.getIterator();
</cfscript>
<cfif it.hasNext()>
<nav class="some-menu">
<cfloop condition="it.hasNext()">
<cfset item = it.next()>
<div class="some-class #$.createCSSID($.content('menuTitle'))#">
<a href="#item.getURL()#"<cfif $.content('contentid') eq item.getContentID()> class="active current"</cfif>>
#HTMLEditFormat(item.getMenuTitle())#
</a>
<!--- This is where you can specify how deep you want to go --->
#$.dspNestedNav(contentID=item.getContentID(), viewDepth=1)#
</div>
</cfloop>
</nav>
</cfif>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment