Copied to clipboard

Flag this post as spam?

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


  • Mario 10 posts 80 karma points
    Mar 20, 2019 @ 13:52
    Mario
    0

    Render Grid not working properly?

    Currently attempting to use

    @CurrentPage.GetGridHtml(Html, "bodyText")

    to render from: Document Type -> Composition -> Content Base that's in one of my document types.

    The problem I'm having is that regardless of whether I place the content in a single column or several columns in the backoffice, the "GetGridHtml" prints it all out as a single column.

    Is there any way around this?

  • Johannes Lantz 28 posts 192 karma points
    Apr 08, 2019 @ 18:07
    Johannes Lantz
    0

    Hi Mario,

    What about specifying the grid layout that you want?

    e.g

    @CurrentPage.GetGridHtml(Html, "bodyText", "bootstrap3-fluid")
    

    //Johannes

  • Nik 1091 posts 4547 karma points MVP 2x c-trib
    Apr 09, 2019 @ 10:49
    Nik
    1

    Hi Mario,

    The Grid, by default, expects you to have included BootStrap 3 into your templates in order to lay it out in the grid format you are expecting. If Bootstrap isn't included in your front end then the browser won't know how to style your grid and as such it will display everything in stacked divs.

    If you don't want to use BootStrap, then you will need to customise the Grid related partial views to assign the correct classes on the correct elements in order to get your grid to generate.

    The reason you are seeing a "grid" layout in the back office even though you aren't on the front end is because the editor is designed to simulate a generic grid in the back office to give you a feel for what it will look like irrelevant of what front end CSS you are actually going to use.

    Hope that helps explain the situation :-)

    Nik

Please Sign in or register to post replies

Write your reply to:

Draft