Try something like the following. I don't think you need the DescendantOrSelf() call on the current page as Children will return the current page's children.
@{
var widgets = Model.Content.Children.First(c => c.DocumentTypeAlias.Equals("widgets")).Children;
}
chaining a statement
im trying to get access to a specific folder (a hidden umbraco page) under any given page and within that folder get all the items of content...
im trying this with no success, the page(folder) called "widgets" under home has 2 widget items under it but nothing is returned....
var currentPage = @Model.Content;
var widgets = currentPage.DescendantOrSelf().Children.Where(x => x.DocumentTypeAlias == "widgets").First().Children;
Hi Mark,
Try something like the following. I don't think you need the DescendantOrSelf() call on the current page as Children will return the current page's children.
Thanks, Dan.
If the page could be at a lower level than Children, then you could do this:
is working on a reply...