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
Hey there
The line under wont work. "currentMemberName" is a var with a string value in.
@parentNode.Children.Where("Name.Equals(currentMemberName)").Count()
It works if does this but the its not a var but just a string equal
@parentNode.Children.Where("Name == \"s1\" ").Count()
Can you try this one
@parentNode.Children.Where(c => c.Name.Equals(currentMemberName)).Count()
Dave
Im just gettin a Error loading MacroEngine script
Is there something special i need to do before lambda expressions work ?
wooohhooo
got it workin
<p>@parentNode.Children.Where("Name.Equals(@0)",currentMemberName).Count()</p>
Beware that using .Where might have some performance problems: http://our.umbraco.org/forum/developers/razor/28479-Razor-menu-performance-(v4)
Jeroen
oh okay Thx for the heads up ill remember it for future ref.
In this example there will max be 10 elements in the list so we should be okay.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Simple .Where not working
Hey there
The line under wont work. "currentMemberName" is a var with a string value in.
It works if does this but the its not a var but just a string equal
Can you try this one
Dave
Im just gettin a Error loading MacroEngine script
Is there something special i need to do before lambda expressions work ?
wooohhooo
got it workin
Beware that using .Where might have some performance problems: http://our.umbraco.org/forum/developers/razor/28479-Razor-menu-performance-(v4)
Jeroen
oh okay Thx for the heads up ill remember it for future ref.
In this example there will max be 10 elements in the list so we should be okay.
is working on a reply...