No problem! I didn't realise that the sectionList was a property of the node which is probably why my version didn't work.
I would definitely recommend using strongly-typed queries like this rather than using dynamics as these execute faster, you get better intellisense and they're going to be dropped in Umbraco 8.
[SOLVED] Best way to filter nodes by checking a checkBoxList
Hi, I have a checkboxlist datatype that have three values.
Now I need to filter nodes by checking inside this checkboxlist that must contains a specific value.
Now I get the full list of nodes with this code
Each article have a checkBoxList (alias sectionList) that I must use to filter the listNodes.
I think I can do something like this...
I tried many combinations but none worked.
In most cases I received the error that I can not use the lambda.
Any idea?
I would use a strongly-typed query rather than dynamics. Something like:
Thank you Dan, tomorrow I'll test your solution.
Have a good day Adriano
Hi Dan,
the query you gave me returned some errors, anyway starting from this I made some changes and the final code is:
Thank you for the support
Adriano
No problem! I didn't realise that the
sectionList
was a property of the node which is probably why my version didn't work.I would definitely recommend using strongly-typed queries like this rather than using dynamics as these execute faster, you get better intellisense and they're going to be dropped in Umbraco 8.
is working on a reply...