weird, that works fine for me. Does@Model.Level work though? You could have a look after setting a breakpoint, maybe the stacktrace is a little more informative.
Both Ancestor(s) and Descendant(s) have level/nodetype filters now so this would work:
- @Model.AncestorOrSelf(2) (get the ancestor (or model self) at the level of 2)
- @Model.AncestorOrSelf("umbHomepage") is also kind of cool (translates into get the ancestor (or model self) which has the nodetype alias of 'umbHomepage')
Topic author was deleted
Best way of getting ancestor of specific level
What's the best way of getting an ancestor of a specific level (say for a second level nav, listing all children of the second level parent) ?
Anyone got an idea?
Something like this should work:
Comment author was deleted
Yeah thought so but can't make it work getting an error
Value cannot be null. Parameter name: expression
weird, that works fine for me. Does @Model.Level work though? You could have a look after setting a breakpoint, maybe the stacktrace is a little more informative.
Both Ancestor(s) and Descendant(s) have level/nodetype filters now so this would work:
- @Model.AncestorOrSelf(2) (get the ancestor (or model self) at the level of 2)
- @Model.AncestorOrSelf("umbHomepage") is also kind of cool (translates into get the ancestor (or model self) which has the nodetype alias of 'umbHomepage')
4.7RC didn't handle property lookups (not document properties but actual getters defined on the DynamicNode) properly
Fixed in 4.7
is working on a reply...