Hi Ault
What about adding a content picker to pick the page to start from? I think you can use xpath to say something like $current to default it to the current node.
Then you could easily iterate through its children.
Great, I'm glad this worked. I really like your idea of adding a grid type to render the children. I can see it working in the side nav or something if you have a 2 column layout etc
Templating Question: (partial views for use in Doctype Grid Editor) How do I jump back up to the page model from within a partial
How do I jump back up to the page model from within a partial that is typed to the doctype that is included in the grid?
Goal: I want to be able to use a "List Children" doctype using the grid editor.
If I begin with the declaration:
@inherits Umbraco.Web.Mvc.UmbracoViewPage<ChildrenListFeature>
I can then use
Model.ChildrenListFeatureTitle
as one would expect.However, I cannot then use
foreach (var varPage in Model.Children)
.Any thought on how best to access the children of the page the DTGE is on?
Hi Ault What about adding a content picker to pick the page to start from? I think you can use xpath to say something like $current to default it to the current node.
Then you could easily iterate through its children.
I want to avoid the tautology of making the user pick the same page to which they are adding the doctype/grid.
hmmm... I wonder what all of the overloads of GetGridHtml are? ... could there be something there?
(EDIT: No, there does not seem to be)
Have you checked everything? I have no idea of where and when was everything submitted. And how everything works.
https://themesurface.com/wordpress/how-to-create-a-separate-page-for-blog-posts-in-wordpress/
Umbraco.AssignedContentItem will give you the context of the page the editor is on (at least with a LeBlender grid editor)
Excellent answer!!!
For future reference - this worked with doctype grid editor in 8.1.5.
Great, I'm glad this worked. I really like your idea of adding a grid type to render the children. I can see it working in the side nav or something if you have a 2 column layout etc
is working on a reply...