Closed rachael-ross closed 8 years ago
Hey @rachael-ross,
I sincerely doubt you'll ever get the Grid working as a property within Archetype. It's not something we've actively made any attempt to support - frankly I believe you're the first one to ever have this use case (or at least to report it failing).
Maybe you should consider using Archetypes within your Archetype to achieve the same goal?
Actually, I got it working for my particular use case, but it's not optimal. When I have time, I'll pull down the source code and see if it's something I could add. We actually have 2 cases where we'd like to use it in that manner. In searching the Internet for possible solutions found by others, there's definitely folks out there wanting to use the grid as a property of an Archetype. Here's one example: https://our.umbraco.org/projects/backoffice-extensions/archetype/sound-off/60460-Rendering-Archtype-plus-Grid-Layout
Thanks for the response. :-)
I have an Archetype (1.12.4.0) with one of its properties as an Umbraco 7.4.3 Grid datatype.
Within the razor view that renders said page using the Archetype, I'm using the following, which renders all the HTML markup, but no actual content within each part of the grid:
@Html.Partial("Grid/bootstrap3", fieldset.GetValue<object>("grid"))
When looking at the json/dynamic object that's getting passed into grid/bootstrap3, there are several properties missing from the sections/rows/areas/controls/editor node. The bootstrap3.cshtml and base.cshtml editor views rely upon the "view" property being present, but all I've got is the "alias" property. Is the Archetype not saving the grid json properly??
Here's an "editor" node from a page that uses the grid directly (not within an Archetype):
But the data from the grid nested in the Archetype is:
As you can see, all the properties besides "alias" is present as the Json data in the database!
Any suggestions??