Hey there!
So, I’m developing a theme, and at some point made the decision that sections’ spacing and background are defined based on order through CSS.
But now, I came to an edge case, where I need two rows with columns in the same section (so they have the same background)
What I’m trying to obtain would look like this:
[section]
[row] [span8][span4] [/row]
[row] [span4][span8] [/row]
[/section]
I noticed there are separat tags in HubL for sections and rows (ie {% dnd_section %} and {% dnd_row %}) and figured this would be obtainable through the visual editor but can’t seem to do so.
What am I getting wrong here?
Thanks!
A dnd_section cannot have a dnd_row as a direct child, but you can have dnd_column inside a dnd_row. So, it’s quite a bit of extra code but you can have a 12-wide dnd_column wrapped around a dnd_row containing your actual columned content. Example:
{% dnd_area "dnd_area" %}
{% dnd_section background_color="#eeeeee" %}
{% dnd_column width=12 %}
{% dnd_row %}
{% dnd_column width=6 %}
{% dnd_row %}
<!-- Modules Here -->
{% end_dnd_row %}
{% end_dnd_column %}
{% dnd_column width=6, offset=6 %}
{% dnd_row %}
<!-- Modules Here -->
{% end_dnd_row %}
{% end_dnd_column %}
{% end_dnd_row %}
{% dnd_row %}
{% dnd_column width=6 %}
{% dnd_row %}
<!-- Modules Here -->
{% end_dnd_row %}
{% end_dnd_column %}
{% dnd_column width=6, offset=6 %}
{% dnd_row %}
<!-- Modules Here -->
{% end_dnd_row %}
{% end_dnd_column %}
{% end_dnd_row %}
{% end_dnd_column %}
{% end_dnd_section %}
{% end_dnd_area %}