Hi,
I have a numeric property called grade set to my pages. I'm trying to get the pages based on grades and tried with
@{
dynamic node = new umbraco.MacroEngines.DynamicNode(1059);
}
@foreach (var page in node.Children.Where("grade < 3").OrderBy("CreateDate desc"))
{
@page.name
}
This is not working. I've also tried getting the levels with a simple if statement but then it cannot find the property "grade". Any ideas on how to solve this? Thanks
Problem with foreach and numeric property
Hi, I have a numeric property called grade set to my pages. I'm trying to get the pages based on grades and tried with
This is not working. I've also tried getting the levels with a simple if statement but then it cannot find the property "grade". Any ideas on how to solve this? Thanks
Hi Niklas,
Did you try IPublishedContent type instead of dynamic?
Thanks, Alex
Hi Alex, thanks for replying. When I try your solution I can that "TypedContent" is missing an assembly reference. Do you know how to fix that?
Thanks / Niklas
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.