CMS Development

igcorreia
Contributor

DND Theme without margings or paddings

SOLVE

I have created a new area using the following code:

    {%- dnd_area 'main_content' class='', label='Main Content' %}
        {%- dnd_section %}
        {%- end_dnd_section %}
    {%- end_dnd_area %}

and HubSpot creates all of this:

Capturar.PNG

Is there a way to have a no_wrapper parameter?

I want to remove all of that HTML code.

0 Upvotes
1 Accepted solution
ndwilliams3
Solution
Key Advisor

DND Theme without margings or paddings

SOLVE

I tried the "no_wrapper=true" and it did nothing.  I looked in the documentation to see if there was another parameter, perhaps something new, but couldn't find anything. I finally decided to revert to using CSS. 

 

I'm just starting to play around with Themes and wrap my head around the structure. I was trying to implement Bootstrap 4 grid and use the dnd_sections to create full width sections using the default background feature of the dnd_section to set the background color or image. 

View solution in original post

3 Replies 3
ndwilliams3
Key Advisor

DND Theme without margings or paddings

SOLVE

@igcorreia,

 

You and me both! I've been playing around with the new DND. I couldn't find a way to remove the wrapper code to the DND area, so I'm using this CSS.

 

{%- dnd_area 'main_content' class='body-container', label='Main Content' %}
        {%- dnd_section %}
        {%- end_dnd_section %}
{%- end_dnd_area %}

<style>
.body-container.container-fluid {
  padding-left: 0;
  padding-right: 0;
}

.body-container > .row-fluid-wrapper {
  padding-left: 0;
  padding-right: 0;
}

.body-container > .row-fluid-wrapper > .row-fluid {
  margin-left: 0;
  margin-right:0;
}

.body-container > .row-fluid-wrapper > .row-fluid > [class*="span"] {
  padding-left: 0;
  padding-right: 0;
}

</style>

Let me know if you find a workaround.

 

igcorreia
Contributor

DND Theme without margings or paddings

SOLVE

@ndwilliams3  thanks for the quick reply. So there is no other way.

what I am looking for is to actually remove the unnecessary HTML. 

Something like: https://designers.hubspot.com/docs/building-blocks/modules/using-modules-in-templates#passing-dicts-...

no_wrapper=True

Capturar.PNG

0 Upvotes
ndwilliams3
Solution
Key Advisor

DND Theme without margings or paddings

SOLVE

I tried the "no_wrapper=true" and it did nothing.  I looked in the documentation to see if there was another parameter, perhaps something new, but couldn't find anything. I finally decided to revert to using CSS. 

 

I'm just starting to play around with Themes and wrap my head around the structure. I was trying to implement Bootstrap 4 grid and use the dnd_sections to create full width sections using the default background feature of the dnd_section to set the background color or image.