Copied to clipboard

Flag this post as spam?

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


  • Jakub 9 posts 89 karma points
    Jan 15, 2018 @ 15:55
    Jakub
    0

    Selecting specific row from Grid

    Hi,

    I'm fairly new to this, so this might be trivial. On my website I have a page "News" which is in Grid layout (mostly contains RTE content). What I'm trying to do is to show first content of the grid on home page. I already loaded the grid from News page to the Home page, but I can't seem to get specific content from it. I tried to convert GridHtml into string and use it as an array and just use split but I can't display images this way. Is there a simple way to get specific content from grid (or just show it)?

    Thanks in advance

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jan 15, 2018 @ 18:11
    Dennis Aaen
    0

    Hi Jakub and welcome to our.

    One of the thing that we write in our documentation when you work with the grid in Umbraco is about best practices and limitations.

    You can find it here. https://our.umbraco.org/documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Grid-Layout/Grid-Layout-Best-Practices

    One of the limitations is that the data in the grid is store as a JSON object which 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 - it simply wasn't designed for this scenario. If you wish to reuse content in multiple pages, it is still recommended that you store these pieces of content as separate content nodes, so they can be stored, cached and queried as usual.

    See https://our.umbraco.org/documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Grid-Layout/Grid-Layout-Best-Practices#limitations

    Best,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft