First of all, all content entered into the grid is stored as a single property value on the content node, as a big JSON object. This means that as soon as the values are stored in the database, there is no managed api to drill into the grid content and target specific cell content - so a grid layout is not a recommended storage of reusable content
Render specific items from grid layout json object
Dear Umbraco Forum Team
Any guidance/sample code to get me started to extract specific fields from grid layout json object?
Thanks Dibs
Hi Dibs,
One of the limitations with the grid layout is:
First of all, all content entered into the grid is stored as a single property value on the content node, as a big JSON object. This means that as soon as the values are stored in the database, there is no managed api to drill into the grid content and target specific cell content - so a grid layout is not a recommended storage of reusable content
https://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/built-in-property-editors-v7/Grid-Layout/Grid-Layout-Best-Practices
/Dennis
I suggest taking a look at the Bootstrap samples in the "~/views/partials/grid/" folder.
These sampels should get you in the right direction.
With a simple event handler I was able to draw content from editors of type rte, and add it to lucene for prettrier preview.
Hi Dibs,
you could also take a look at this NuGet-package: https://www.nuget.org/packages/Skybrud.Umbraco.GridData/
It makes the Grid strongly-typed via a model.
You can see source and samples here: https://github.com/skybrud/Skybrud.Umbraco.GridData
/René
Thanks Guys
will look in to your suggestions
Dibs
is working on a reply...