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
How can i find a child node by comparing a string value with its on umbraco field?
To retrieve a list of child nodes by one of their properties which matches a string value, you could use something like the following:
@{ var stringValue = "YourStringValue"; var childNodes = Model.Content.Children.Where(x => x.GetPropertyValue<string>("yourProperty") == stringValue); if (childNodes != null) { // Iterate through childNodes foreach (var item in childNodes) { // Apply your logic here } } }
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Find Child Node
How can i find a child node by comparing a string value with its on umbraco field?
To retrieve a list of child nodes by one of their properties which matches a string value, you could use something like the following:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.