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?

1
  • What do you have if you remove the placeholder code line and reload? Feb 5, 2019 at 20:11

2 Answers 2

8

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

1
  • That precisely answers the question. Thank you! Feb 5, 2019 at 22:35
-2

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.

3
  • That was the first I did, in order to identify that particular line generates div Feb 5, 2019 at 22:26
  • And what was the outcome? Feb 5, 2019 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 Feb 6, 2019 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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