Hello Kentico dev i want to display the content three in my page per this description
Page1
Page2 child1 child1-1 child1-2 child2
i tried to this multiple query but didnt work and the path start from /
DocumentHelper.GetDocuments() .Type("cms.page", q => q.Columns("DocumentName", "NodeAliasPath")) .Type("cms.news", q => q.Columns("DocumentName", "NodeAliasPath") .Type("cms.children", q => q.Columns("DocumentName", "NodeAliasPath")) .Path(path, PathTypeEnum.Children) .OrderBy("NodeLevel, NodeOrder") .OnSite("dancinggoat") .Culture("en-us") .OrderBy("NodeLevel, NodeOrder, DocumentName") .ToList() .Select(x => new SiteMapViewModel { DocumentName = x.DocumentName, NodeAliasPath = x.NodeAliasPath, //ChildrenCount = x.Children.Count }) but didn't work
Hello Nadia,
To display hierarchical data (e.g. the content tree exactly as it appears in the admin), you can use the example in this article: https://devnet.kentico.com/articles/displaying-the-content-tree-programmatically
Please, sign in to be able to submit a new answer.