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












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?










share|improve this question

























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

    – Hugo Santos
    Feb 5 at 20:11
















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?










share|improve this question

























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

    – Hugo Santos
    Feb 5 at 20:11














2












2








2


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 Feb 5 at 19:44









Richard Seal

14.8k32864




14.8k32864










asked Feb 5 at 18:33









Martin MilesMartin Miles

1335




1335













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

    – Hugo Santos
    Feb 5 at 20:11



















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

    – Hugo Santos
    Feb 5 at 20:11

















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

– Hugo Santos
Feb 5 at 20:11





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

– Hugo Santos
Feb 5 at 20:11










2 Answers
2






active

oldest

votes


















5














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
    Feb 5 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.






share|improve this answer
























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

    – Martin Miles
    Feb 5 at 22:26











  • And what was the outcome?

    – Hugo Santos
    Feb 5 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 at 9:39












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









5














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
    Feb 5 at 22:35
















5














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
    Feb 5 at 22:35














5












5








5







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 Feb 5 at 21:47









Elena ZlatevaElena Zlateva

487311




487311













  • That precisely answers the question. Thank you!

    – Martin Miles
    Feb 5 at 22:35



















  • That precisely answers the question. Thank you!

    – Martin Miles
    Feb 5 at 22:35

















That precisely answers the question. Thank you!

– Martin Miles
Feb 5 at 22:35





That precisely answers the question. Thank you!

– Martin Miles
Feb 5 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.






share|improve this answer
























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

    – Martin Miles
    Feb 5 at 22:26











  • And what was the outcome?

    – Hugo Santos
    Feb 5 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 at 9:39
















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
    Feb 5 at 22:26











  • And what was the outcome?

    – Hugo Santos
    Feb 5 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 at 9:39














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 Feb 5 at 20:15









Hugo SantosHugo Santos

734118




734118













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

    – Martin Miles
    Feb 5 at 22:26











  • And what was the outcome?

    – Hugo Santos
    Feb 5 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 at 9:39



















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

    – Martin Miles
    Feb 5 at 22:26











  • And what was the outcome?

    – Hugo Santos
    Feb 5 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 at 9:39

















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

– Martin Miles
Feb 5 at 22:26





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

– Martin Miles
Feb 5 at 22:26













And what was the outcome?

– Hugo Santos
Feb 5 at 23:05





And what was the outcome?

– Hugo Santos
Feb 5 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 at 9:39





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 at 9:39


















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

Plaza Victoria

In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...