Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi everyone,
I'm trying to check if a specific page's child's child has a property which is true or false.
I currently have this code:
var productSectionPage = Umbraco.TypedContent(1128); var productTypes = productSectionPage.Children(f => f.IsVisible() && f.DocumentTypeAlias == "categoryPage");
I just need to know, how I can go a step further in like this, if it was possible:
productSectionPage.Children.Childre
Hi Mike,
You can do it like that:
var item = productSectionPage.Descendants().Where(x => x.Name == "Racercykler");
Be aware that Descendants method has poor performance, but its really helpful in situations like that.
Also I used Name for determining needed node - it's bad also, better to use documentType alias or something like that.
Thanks,
Alex
Absolutely fabolous Alex! I changed it to documentType as it catches all the pages I need.
Thank you SO very much for the help buddy! :D
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Check Node's Child-Child for property
Hi everyone,
I'm trying to check if a specific page's child's child has a property which is true or false.
I currently have this code:
I just need to know, how I can go a step further in like this, if it was possible:
Hi Mike,
You can do it like that:
Be aware that Descendants method has poor performance, but its really helpful in situations like that.
Also I used Name for determining needed node - it's bad also, better to use documentType alias or something like that.
Thanks,
Alex
Absolutely fabolous Alex! I changed it to documentType as it catches all the pages I need.
Thank you SO very much for the help buddy! :D
is working on a reply...