diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesWithDoctype.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesWithDoctype.cshtml index 9569ef7a7e..7bf279768b 100644 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesWithDoctype.cshtml +++ b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesWithDoctype.cshtml @@ -10,9 +10,15 @@ @{ @*Build a query and return the visible items *@ - var selection= Model.Textpages.Where(query).Where("Visible"); + var selection= Model.Textpages.Where("Visible"); + + @* + Example of more querying, if you have a true/false property with the alias of shouldBeFeatured: + var selection= Model.Textpages.Where("shouldBeFeatured == true").Where("Visible"); + *@ } + @*Determine if there are any nodes in the selection, then render list *@ @if(selection.Any()){ diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListDescendantsFromCurrentPage.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListDescendantsFromCurrentPage.cshtml index 32b106757b..7d287523ac 100644 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListDescendantsFromCurrentPage.cshtml +++ b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListDescendantsFromCurrentPage.cshtml @@ -1,25 +1,21 @@ -@inherits PartialViewMacroPage -@using Umbraco.Cms.Web -@using Umbraco.Cms.Web.Macros -@using Umbraco.Framework - +@inherits umbraco.MacroEngines.DynamicNodeContext @* Ensure that the Current Page has children, where the property umbracoNaviHide is not True *@ -@if (CurrentPage.Children.Where("umbracoNaviHide != @0", "True").Any()) +@if (Model.Children.Where("Visible").Any()) { @* Get the first page in the children, where the property umbracoNaviHide is not True *@ - var naviLevel = CurrentPage.Children.Where("umbracoNaviHide != @0", "True").First().Level; + var naviLevel = Model.Children.Where("Visible").First().Level; @* Add in level for a CSS hook *@