Copied to clipboard

Flag this post as spam?

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


  • rajesh 1 post 71 karma points
    17 days ago
    rajesh
    0

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

  • Kevin Jump 1753 posts 11263 karma points MVP 4x c-trib
    17 days ago
    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