Copied to clipboard

Flag this post as spam?

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


  • David McGawn 37 posts 150 karma points
    Nov 22, 2016 @ 09:29
    David McGawn
    0

    Grid Layout

    So i have been working this package into our website and i love it, the only issue i have is i cant get the grid to render anyway it just renders all the code, does anyone have a definitive way of making this work, i know there is another thread with some ideas but surely as the grid is such a big part of umbraco now there must be a right way to do it

    Thanks

    David

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Nov 23, 2016 @ 23:06
    Marc Goodson
    0

    Hi David

    I wonder if you are just writing out the property as you would do other Umbraco properties ? or are you using the GetGridHtml helpers ?

    https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/grid-layout/render-grid-in-template

    So

    @Html.GetGridHtml(Model.Content, "propertyAlias")
    

    should take your grid content and render the grid, using the bootstrap3.cshtml grid rendering file located in /views/partials/grid/bootstrap3.cshtml

    You can write your own custom grid rendering file you 'don't have to use the bootstrap grid'

    regards

    Marc

  • Andrew Vennells 16 posts 101 karma points
    Nov 24, 2016 @ 07:03
    Andrew Vennells
    0
    @Model.Content.GetGridHtml("{fieldName}");
    

    Also, if you use this package you can customise your layouts even more:

    https://our.umbraco.org/projects/backoffice-extensions/leblender/

  • David McGawn 37 posts 150 karma points
    Nov 24, 2016 @ 11:12
    David McGawn
    0

    I managed to get it working with the skybrud grid package, with a bit off tweaking as was suggested in the other thread about the grid which i never noticed at first,

    what i done was :

    @using Skybrud.Umbraco.GridData

    var gridData = Model.Content.GetSegmentedValue("testGridP"); GridDataModel grid = GridDataModel.Deserialize(gridData.ToString());

    @grid.GetHtml(Html, "bootstrap3")

Please Sign in or register to post replies

Write your reply to:

Draft