'CurrentPage' has been removed in V8, so I think you are after
var selection = Model.Children;
or
var selection = Model.Children(f=>f.IsVisible());
If you want to filter out any children that have 'umbracoNaviHide' property ticked.
There is also now an overload for culture, if you are building a multi-culture site with variants.
And if you are in a PartialView where perhaps you have changed the underlying Model, then you can still access the current published page via the UmbracoContext eg:
var children = UmbracoContext.PublishedRequest.PublishedContent.Children();
Umbraco 8 Upgrade CurrentPage.Children
Hello,
I am upgrading from 7 to 8 and in my code i was using CurrentPage.Children to pull through all of the pages.
In 8 this method does not work and I am unable to find a way to replicate this in 8.
Hi Michael
'CurrentPage' has been removed in V8, so I think you are after
or
If you want to filter out any children that have 'umbracoNaviHide' property ticked.
There is also now an overload for culture, if you are building a multi-culture site with variants.
And if you are in a PartialView where perhaps you have changed the underlying Model, then you can still access the current published page via the UmbracoContext eg:
regards
Marc
is working on a reply...