Copied to clipboard

Flag this post as spam?

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


  • rajesh 4 posts 74 karma points
    Jul 29, 2020 @ 05:29
    rajesh
    0

    Umbraco 8 Grid Layout

    Umbraco Grid layout not rendering properly in Umbraco V8 i am using Bootstrap4

  • Kevin Jump 2348 posts 14896 karma points MVP 8x c-trib
    Jul 29, 2020 @ 15:12
    Kevin Jump
    0

    Hi,

    By default the files that render the grid in umbraco do so using the bootstrap3 style.

    you will need to make Bootstrap4 versions of these files.

    In general this means taking copies of the bootstrap3.cshtml and bootstrap3-fluid.cshtml files from views/partials/grid and making bootstrap4 versions of them.

    You will need to tidy up the grid html a little to get it working with Bootstrap4 - the main issue I've seen is bootstrap 4 doesn't like divs or anything between the <div class="container"> and <div class="row"> or <div class="col-sm-*"> divs; and the default umbraco templates have these. So they need to be collapsed.

    Once you have bootstrap4 versions you can use them to render the grid by passing the 'framework' to the GetGridHtml call.

    @Html.GetGridHtml(Model, "boostrap4")
    

    will look for bootstrap4.cshtml.

  • 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