Why does empty @Html.Sitecore().Placeholder(“main”) generate ?












1















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?










share|improve this question

























  • What do you have if you remove the placeholder code line and reload?

    – Hugo Santos
    8 hours ago
















1















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?










share|improve this question

























  • What do you have if you remove the placeholder code line and reload?

    – Hugo Santos
    8 hours ago














1












1








1


1






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?










share|improve this question
















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?







sxa placeholders






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 8 hours ago









Richard Seal

13.8k32561




13.8k32561










asked 9 hours ago









Martin MilesMartin Miles

1285




1285













  • What do you have if you remove the placeholder code line and reload?

    – Hugo Santos
    8 hours ago



















  • What do you have if you remove the placeholder code line and reload?

    – Hugo Santos
    8 hours ago

















What do you have if you remove the placeholder code line and reload?

– Hugo Santos
8 hours ago





What do you have if you remove the placeholder code line and reload?

– Hugo Santos
8 hours ago










2 Answers
2






active

oldest

votes


















3














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






share|improve this answer
























  • That precisely answers the question. Thank you!

    – Martin Miles
    5 hours ago



















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.






share|improve this answer
























  • That was the first I did, in order to identify that particular line generates div

    – Martin Miles
    6 hours ago











  • And what was the outcome?

    – Hugo Santos
    5 hours ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "664"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f16493%2fwhy-does-empty-html-sitecore-placeholdermain-generate-div-class-row%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














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






share|improve this answer
























  • That precisely answers the question. Thank you!

    – Martin Miles
    5 hours ago
















3














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






share|improve this answer
























  • That precisely answers the question. Thank you!

    – Martin Miles
    5 hours ago














3












3








3







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






share|improve this answer













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







share|improve this answer












share|improve this answer



share|improve this answer










answered 6 hours ago









Elena ZlatevaElena Zlateva

467311




467311













  • That precisely answers the question. Thank you!

    – Martin Miles
    5 hours ago



















  • That precisely answers the question. Thank you!

    – Martin Miles
    5 hours ago

















That precisely answers the question. Thank you!

– Martin Miles
5 hours ago





That precisely answers the question. Thank you!

– Martin Miles
5 hours ago











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.






share|improve this answer
























  • That was the first I did, in order to identify that particular line generates div

    – Martin Miles
    6 hours ago











  • And what was the outcome?

    – Hugo Santos
    5 hours ago
















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.






share|improve this answer
























  • That was the first I did, in order to identify that particular line generates div

    – Martin Miles
    6 hours ago











  • And what was the outcome?

    – Hugo Santos
    5 hours ago














0












0








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.






share|improve this answer













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.







share|improve this answer












share|improve this answer



share|improve this answer










answered 8 hours ago









Hugo SantosHugo Santos

12112




12112













  • That was the first I did, in order to identify that particular line generates div

    – Martin Miles
    6 hours ago











  • And what was the outcome?

    – Hugo Santos
    5 hours ago



















  • That was the first I did, in order to identify that particular line generates div

    – Martin Miles
    6 hours ago











  • And what was the outcome?

    – Hugo Santos
    5 hours ago

















That was the first I did, in order to identify that particular line generates div

– Martin Miles
6 hours ago





That was the first I did, in order to identify that particular line generates div

– Martin Miles
6 hours ago













And what was the outcome?

– Hugo Santos
5 hours ago





And what was the outcome?

– Hugo Santos
5 hours ago


















draft saved

draft discarded




















































Thanks for contributing an answer to Sitecore Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f16493%2fwhy-does-empty-html-sitecore-placeholdermain-generate-div-class-row%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Magento 2 controller redirect on button click in phtml file

Polycentropodidae