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 Grid layout not rendering properly in Umbraco V8 i am using Bootstrap4

  • Kevin Jump 2310 posts 14694 karma points MVP 7x 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.

Please Sign in or register to post replies

Write your reply to:

Draft