Skip to content

Instantly share code, notes, and snippets.

@warrenbuckley
Created February 1, 2012 17:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save warrenbuckley/1718040 to your computer and use it in GitHub Desktop.
Save warrenbuckley/1718040 to your computer and use it in GitHub Desktop.
Umbraco V5 Example - List Child Pages from Current Page
@inherits PartialViewMacroPage
@using Umbraco.Cms.Web
@using Umbraco.Cms.Web.Macros
@using Umbraco.Framework
@* Check we have child pages *@
@if (DynamicModel.Children.Any())
{
<nav id="subnavi">
<ul>
@foreach (var page in DynamicModel.Children)
{
//Check the page is not hidden with umbracoNaviHide
if (page.umbracoNaviHide != "True")
{
<li><a href="@page.Url">@page.Name</a></li>
}
}
</ul>
</nav>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment