@inherits Umbraco.Web.Mvc.UmbracoTemplatePage @* This snippet creates links for every single page (no matter how deep) below the page currently being viewed by the website visitor, displayed as nested unordered html lists. *@ @{ var selection = CurrentPage.Children.Where("Visible"); } @* Ensure that the Current Page has children *@ @if (selection.Any()) { @* Get the first page in the children, where the property umbracoNaviHide is not True *@ var naviLevel = CurrentPage.FirstChild().Where("Visible").Level; @* Add in level for a CSS hook *@ } @helper childPages(dynamic selection) { @* Ensure that we have a collection of pages *@ if (selection.Any()) { @* Get the first page in pages and get the level *@ var naviLevel = selection.First().Level; @* Add in level for a CSS hook *@ } }