I want to setup a new project using compositions for many things, so I can reuse cross pages. I have setup a composition with a Grid Editor, and added that composition to a page, but I cannot get the grid to render.
After some digging, I found that I have to create a partial view to render compositions, and I ended up with this:
I don't know how to answer that question. What do you expect should work?
I tried a bunch of things, and this is the only thing that has worked so far.
Grid in composition
I want to setup a new project using compositions for many things, so I can reuse cross pages. I have setup a composition with a Grid Editor, and added that composition to a page, but I cannot get the grid to render.
After some digging, I found that I have to create a partial view to render compositions, and I ended up with this:
But I just get this error, and I cannot find a solution:
cannot convert from 'Umbraco.Web.PublishedModels.IContentComposition' to 'Umbraco.Core.Models.PublishedContent.IPublishedProperty'
What am I missing?
The composition has alias contentComposition and the editor has contentGrid
I found the solution included in this post
https://our.umbraco.com/packages/backoffice-extensions/nested-content/nested-content-feedback/88837-how-to-render-grid-layout-in-nested-content
Because the grid is in a composition, you have to use GetProperty: @Html.GetGridHtml(Model.GetProperty("contentGrid"))
Are you not able to use the Property that modelsbuilder provides?
I don't know how to answer that question. What do you expect should work? I tried a bunch of things, and this is the only thing that has worked so far.
is working on a reply...