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
I want access all descendant of current node using server side.
I tried Umbraco.ContentQuery.Search("Corporate") which gives all the children whether it is in level 1 or 4.
Can anybody help me.
Hi Nekesh,
It's pretty easy task.
Look at documentation, there are a lot of methods - https://our.umbraco.org/documentation/reference/templating/mvc/querying
I think you have to use this:
Umbraco.AssignedContentItem.Descendants("nodeTypeAlias");
Thanks,
Alex
Use can try this
@foreach(var page in CurrentPage.AncestorOrSelf(1).Children)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Accessing children of a node to level 1
I want access all descendant of current node using server side.
I tried Umbraco.ContentQuery.Search("Corporate") which gives all the children whether it is in level 1 or 4.
Can anybody help me.
Hi Nekesh,
It's pretty easy task.
Look at documentation, there are a lot of methods - https://our.umbraco.org/documentation/reference/templating/mvc/querying
I think you have to use this:
Thanks,
Alex
Hi Nekesh,
Use can try this
is working on a reply...