Hey, I need to put some kind of specific html markup (with absolute positioning, etc.) containing modules (buttons, forms, ...) into a reusable section template (inside a dnd_section tag), but Hubspot seems to be ignoring it completely! When dropped onto the page editor it just adds an extra 'Drop modules here' placeholder instead of the actual section template contents.
I know that there's a way to use custom html within a dnd_section using rich_text module, but in this case it is impossible to arrange buttons/forms modules inside.
Is it even possible to use section template like the following?
will drop any kind of static html as it support only other dnd_elements.
There are 3 options you can still achieve your desired outcome:
Create a reusable DND section template and add a class to it. DND sections outside the dnd section template don't support classes
Create custom "row modules". That have the desired layout. If you add a repeater and some choice fields, you can even add some sort of flexibility to mimic dnd. Big benefit of those is that they will have only those options that you provide to the user. (Big) drawback, it may become very dev heavy
Create something like a settings module which will have some JS to modify the section it is put in... (not recommended)
will drop any kind of static html as it support only other dnd_elements.
There are 3 options you can still achieve your desired outcome:
Create a reusable DND section template and add a class to it. DND sections outside the dnd section template don't support classes
Create custom "row modules". That have the desired layout. If you add a repeater and some choice fields, you can even add some sort of flexibility to mimic dnd. Big benefit of those is that they will have only those options that you provide to the user. (Big) drawback, it may become very dev heavy
Create something like a settings module which will have some JS to modify the section it is put in... (not recommended)
Just a quick question: Is this code wrapped in a dnd_area?
A {% dnd_section %} is a top-level row, and must be nested within a {% dnd_area %} tag. Sections can also be defined as a template, and then included into a dnd_area, making them ideal for quickly scaffolding out a template.