Probably really simple question but I'm trying to select all of the children of my current page that share a common Master Document Type.
So if I have a Document Type of 'Fruit'. And then Child Nodes of type 'Apple' and 'Orange', I'd like a query that allows me to select those. Something like:
@foreach(var nodeinCurrentPage.Children.Where("node => node is Fruit")){
Using the Master type is pretty important as I don't want to have to edit code if I subsequently add 'Banana'.
I'm guessing there's a pretty obvious solution I'm missing?
I think you are saying that the child nodes are of different document types but that they have the same master document type? If so, this isn't actually a common requirement however I believe I answered this question before here
Select children with common Master Document Type
Hi,
Probably really simple question but I'm trying to select all of the children of my current page that share a common Master Document Type.
So if I have a Document Type of 'Fruit'. And then Child Nodes of type 'Apple' and 'Orange', I'd like a query that allows me to select those. Something like:
@foreach(var node in CurrentPage.Children.Where("node => node is Fruit") ) {
Using the Master type is pretty important as I don't want to have to edit code if I subsequently add 'Banana'.
I'm guessing there's a pretty obvious solution I'm missing?
Hi Liam,
Welcome to Our!
I think you are saying that the child nodes are of different document types but that they have the same master document type? If so, this isn't actually a common requirement however I believe I answered this question before here
Let me know if I've understood you right or not.
Jeavon
is working on a reply...