Query nodes and filter on multi content node picker
Hi all,
what is the best way to query a content nodes list based on an id in the multi node content picker?
var root = Umbraco.TypedContentAtRoot().First();
var companyRepo = root.Children(c => c.DocumentTypeAlias == "companyRepo").First();
So here I have my Company Repo which is a container that contains all companies. Now each company has a property called Categories which is the multi node content picker.
I need to filter these companies based on the currentpage id that needs to be located in the Categories property.
Query nodes and filter on multi content node picker
Hi all,
what is the best way to query a content nodes list based on an id in the multi node content picker?
So here I have my
Company Repo
which is a container that contains all companies. Now each company has a property calledCategories
which is the multi node content picker.I need to filter these companies based on the currentpage id that needs to be located in the
Categories
property./Michaël
Hi Michaël,
I would do it with this code:
Hope it will help you.
Thanks,
Alex
Hi Alex,
thanks for taking me into the right direction. I got it working by using the following code:
/Michaël
Hi Michaël
Glad to hear, have a nice day!
Thanks,
Alex
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.