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
Just a simple thing in my 4.11 mvc installation.
I want to to get a nodes children by specifying the parent node's id.
Im trying this:
@{ var menuItems = Model.Content.NodeById(1119).Children.Where(x => x.IsVisible() && x.IsDocumentType("MenuItem") && x.TemplateId > 0 && Umbraco.MemberHasAccess(x.Id, x.Path)); }
But this obviously isnt right. What is the way to do it and are there any good documentations somewhere so I know what possibilities I have?
The Umbraco Helper has some useful methods: http://our.umbraco.org/documentation/Reference/Mvc/views
I think you need TypedContent or Content on the helper.
Jeroen
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.
Continue discussion
Get node by ID
Just a simple thing in my 4.11 mvc installation.
I want to to get a nodes children by specifying the parent node's id.
Im trying this:
@{ var menuItems = Model.Content.NodeById(1119).Children.Where(x => x.IsVisible() && x.IsDocumentType("MenuItem") && x.TemplateId > 0 && Umbraco.MemberHasAccess(x.Id, x.Path)); }
But this obviously isnt right. What is the way to do it and are there any good documentations somewhere so I know what possibilities I have?
The Umbraco Helper has some useful methods: http://our.umbraco.org/documentation/Reference/Mvc/views
I think you need TypedContent or Content on the helper.
Jeroen
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.