Skip to content

Instantly share code, notes, and snippets.

@ronnieduke
Created December 22, 2014 18:40
Show Gist options
  • Save ronnieduke/c2231cda3f56e660549f to your computer and use it in GitHub Desktop.
Save ronnieduke/c2231cda3f56e660549f to your computer and use it in GitHub Desktop.
Get Sub Nav from a Mura Page by Content ID
<cfset bean=$.getBean('content').loadBy(contentID="whatever content ID")>
<cfset subNav=bean.getKidsIterator()>
<cfif subNav.hasNext()>
<ul>
<cfloop condition="subNav.hasNext()">
<cfset item=subNav.next()>
<li><a href="#item.getURL()#">#item.getMenuTitle()#</a></li>
</cfloop>
</ul>
</cfif>
@cameroncf
Copy link

Also worth exploring here may be:

item.getDisplay(); // display this item
item.getDisplayStart(); // open of display window
item.getDisplayStop(); // close of display window
item.getIsNav(); // show in nav (boolean)
item.getRestricted(); // is restricted (boolean)
item.getRestrictGroups(); // list of groups allowed to access item
item.getAllValues(); // lots more fun stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment