Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dibs 183 posts 899 karma points
    Jun 27, 2015 @ 16:34
    Dibs
    0

    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

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Jun 27, 2015 @ 17:31
    Dennis Aaen
    0

    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

  • Rasmus Eeg 91 posts 456 karma points c-trib
    Jun 29, 2015 @ 05:15
    Rasmus Eeg
    0

    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.

  • René Pjengaard 114 posts 675 karma points c-trib
    Jun 29, 2015 @ 07:59
    René Pjengaard
    100

    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é

  • Dibs 183 posts 899 karma points
    Jun 30, 2015 @ 13:41
    Dibs
    0

    Thanks Guys

    will look in to your suggestions

    Dibs

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies