CMS Development

Estebark
Member

How to do a custom Layout

SOLVE

How are you?
I would like to ask a question about how it is possible to create sections with two, three, or four columns, but using your own CSS clasess. I have created two sections at the moment that are displayed in the CMS so that designers can drag and drop them, but when dragging the section that says it has two columns, the two columns do not appear, only one appears with the full width with the area to place the module. The only way these columns appear is if you set the default structure, but this one comes with the width parameters. I know that this works for the default style sheet, but is there a way to make your own and have the columns also work with your own structure that you create yourself? I'm looking forward to any information, thank you very much.

 

Estebark_0-1724968874009.png

 

0 Upvotes
2 Accepted solutions
Anton
Solution
Thought Leader | Partner
Thought Leader | Partner

How to do a custom Layout

SOLVE

Hey @Estebark

the easiest way to create custom layouts is to build the layout on a blank page, enable the developer mode, copy the hubl code, paste it into your saved section template and go from there. 

 

You can access the developer mode either by adding

?developerMode=true

to your domain while you're in the page editor(noot Design-Manager) or via this chrome extension (it has other cool features too)

Bildschirmfoto 2024-08-31 um 15.54.22.png

 

best, 

Anton

Anton Bujanowski Signature

View solution in original post

GiantFocal
Solution
Top Contributor | Partner
Top Contributor | Partner

How to do a custom Layout

SOLVE

Hi @Estebark,

 

You'll need to specify the offset and width parameters to your dnd_columns.

 

For example, if you're creating a 3-column section, here is how your dnd_columns should look like:

 

{% dnd_column width=4 %}
{% end_dnd_column %}
{% dnd_column width=4, offset=4 %}
{% end _dnd_column %}
{% dnd_column width=4, offset=8 %}
{% end _dnd_column %}

 

The total number of column widths must be 12. The offset should be counted from the left column. 

 

Best regards,
Ernesto @ GiantFocal
Found this answer helpful?
Marking it as the solution helps both the community and me - thanks in advance!

View solution in original post

2 Replies 2
GiantFocal
Solution
Top Contributor | Partner
Top Contributor | Partner

How to do a custom Layout

SOLVE

Hi @Estebark,

 

You'll need to specify the offset and width parameters to your dnd_columns.

 

For example, if you're creating a 3-column section, here is how your dnd_columns should look like:

 

{% dnd_column width=4 %}
{% end_dnd_column %}
{% dnd_column width=4, offset=4 %}
{% end _dnd_column %}
{% dnd_column width=4, offset=8 %}
{% end _dnd_column %}

 

The total number of column widths must be 12. The offset should be counted from the left column. 

 

Best regards,
Ernesto @ GiantFocal
Found this answer helpful?
Marking it as the solution helps both the community and me - thanks in advance!
Anton
Solution
Thought Leader | Partner
Thought Leader | Partner

How to do a custom Layout

SOLVE

Hey @Estebark

the easiest way to create custom layouts is to build the layout on a blank page, enable the developer mode, copy the hubl code, paste it into your saved section template and go from there. 

 

You can access the developer mode either by adding

?developerMode=true

to your domain while you're in the page editor(noot Design-Manager) or via this chrome extension (it has other cool features too)

Bildschirmfoto 2024-08-31 um 15.54.22.png

 

best, 

Anton

Anton Bujanowski Signature