If i do it that way dealing with the variable assignments doesn't work with the lambdas. However if i do it the following using DynamicNode instead of Libray.GetNodeByID, I then get access to the Where clauses.
@{ var mediaItems = new DynamicNode(1191).GetChildrenAsList.Items; if(mediaItems.Any()) { var tvItems = mediaItems.Where(dn => dn.NodeTypeAlias == "Television"); var radioItems = mediaItems.Where(dn => dn.NodeTypeAlias == "Audio"); var printItems = mediaItems.Where(dn => dn.NodeTypeAlias == "Radio"); if(tvItems.Any() || radioItems.Any() || printItems.Any()) { <div>moo</div> } } }
Explanation for DynamicNode behaviour?
Hey all!
Just wondering if someone could please explain the following:
I've got the following code:
If i do it that way dealing with the variable assignments doesn't work with the lambdas. However if i do it the following using DynamicNode instead of Libray.GetNodeByID, I then get access to the Where clauses.
An explanation would be MOST appreciated
is working on a reply...