Created
February 1, 2012 17:01
-
-
Save warrenbuckley/1718040 to your computer and use it in GitHub Desktop.
Umbraco V5 Example - List Child Pages from Current Page
This file contains 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
@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