2

I am working with SXA 1.8 on Sitecore 9.0 update 2. Since Bootstrap 4 is being selected for the current site, ~/Views/SxaLayout/Bootstrap4Body.cshtml view is being used. This view has such a code:

<main>
    <div id="content" class="@Html.Sxa().GridPlaceholderClasses("main")">
        @Html.Sitecore().Placeholder("main")
    </div>
</main>

(I definitely know that particular view is being used since it hits in debugger), but having no components assigned into itself, it rendered with:

<main>
    <div id="content" class="container">
        <div class="row"></div>
    </div>
</main>

Thus there is a question: where does <div class="row"></div> come from and should not be it empty?

  • What do you have if you remove the placeholder code line and reload? – Hugo Santos Feb 5 '19 at 20:11
6

For Bootstrap 3, I think these were hardcoded on the body view, but for Bootstrap 4, on this item - /sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 4/Bootstrap 4 Grid Definition you should see a section that defines the Placeholder Wrapper tag/class

enter image description here

  • That precisely answers the question. Thank you! – Martin Miles Feb 5 '19 at 22:35
0

Firstly, remove this line and reload:

@Html.Sitecore().Placeholder("main")

If the row div is still there, then remove this piece of code:

class="@Html.Sxa().GridPlaceholderClasses("main")"

I'm pretty sure that by doing so you will know exactly where this div row line is coming from.

After that, it's just a matter of troubleshooting your own code and start isolating the possible origins to figure out the exact source of this weird line.

  • That was the first I did, in order to identify that particular line generates div – Martin Miles Feb 5 '19 at 22:26
  • And what was the outcome? – Hugo Santos Feb 5 '19 at 23:05
  • The outcome I initially wrote in my question: placeholder does that! That's why I raised my question - why and how does it – Martin Miles Feb 6 '19 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.