Are there any common examples out there for filtering based on property values in where clauses? there just seems to be a lack of grass roots examples out there for very common xslt type functions converted to razor..
Colorized syntax should be fine if you copy it in from the Umbraco editor and from the droplist here in the comments section tha says "Paragraph" there should be an option for "preformatted." Post you code in that.
This is from a test page that successfully shows current and future rehearsals in a table. There are a few extraneous lines in there. What I had wanted to do was to compare the value endDatetime with "now", but the greater than and less than symbols caused the macro to fail to load.
Razor Where Clauses?!
Hi i was just wondering the rules when it comes to where clauses?
it appears you can't Where("something == true && somethingelse == "somestring")
i.e. var items = node.Children.Where("Visible && !showInFooter").Where("Level <= maxLevelForSitemap", values);
is that the case? or am i just setting up my clauses incorrectly? or do you need a separate where statement for each item you're filtering on?
do I have to check if the showInFooter property exists before I can use it?!
Cheers,
Tom
I found that the less than symbol (<) in the .Where caused the script to fail.
What's the trick to posting colorized syntax? I'd be happy to post a sample of what I have working.
Regards,
Bob G.
@RGoodSW
Colorized syntax should be fine if you copy it in from the Umbraco editor and from the droplist here in the comments section tha says "Paragraph" there should be an option for "preformatted." Post you code in that.
---
This is from a test page that successfully shows current and future rehearsals in a table. There are a few extraneous lines in there. What I had wanted to do was to compare the value endDatetime with "now", but the greater than and less than symbols caused the macro to fail to load.
Hope this helps.
Regards,
Bob G.
is working on a reply...