Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save arjanwoldring/2127342 to your computer and use it in GitHub Desktop.
Save arjanwoldring/2127342 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