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
Is there any way to combine 2 selections?
For example:
I'd like to get the children of a node with id "1168" and "1169"
var selection = Umbraco.Content(1168).Children("news")
var selection = Umbraco.Content(1169).Children("news")
I've tried with
var selection = Umbraco.Content(1168|1169).Children("news")
But it won't show anything. Is there any possible way to combine 2 selections?
Thanks
Hi rendervouz.
Try doing like this with typed models:
var selection = Umbraco.TypedContent(1168,1169).SelectMany(content => content.Children.Where(child => child.DocumentTypeAlias == "news"));
Best of luck.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Combine 2 Selections
Is there any way to combine 2 selections?
For example:
I'd like to get the children of a node with id "1168" and "1169"
var selection = Umbraco.Content(1168).Children("news")
var selection = Umbraco.Content(1169).Children("news")
I've tried with
var selection = Umbraco.Content(1168|1169).Children("news")
But it won't show anything. Is there any possible way to combine 2 selections?
Thanks
Hi rendervouz.
Try doing like this with typed models:
Best of luck.
is working on a reply...