Dnd area causing modules disappear

Hello,

my client wants to be able to add more modules to Blog Post and Blog Listing templates after clicking “Edit”.

I added dnd_area to my template, but my custom modules disappeared because of that.

What might be the possible problem?
I did that in another project and it worked - customer was able to add more modules.

Hello @WGwardjak ,

Can you please show us your code?

Best regards,

Özcan

Hi @WGwardjak,

first of all:

- there is unfortunatly no drag&drop" for blog posts for now - but you can upvote this in the ideas board.

To get things right:
unless the client edit the template your custom module gets displayed. As soon as the client edits it - it disappears. Right? Do those projects/clients have different “software”? Like does project A has CMS Hub Pro and project B only Marketing Hub Pro. Things like this. I’ve came accross some similar behavior in the past.

Also: there are few things that you shouold check/do:

  1. change {% module_block %}… {% end_module_block %} to {% dnd_module %}…{% end_dnd_module %} for all modules that are inside of the dnd_area
  2. If your module shouldn’t be removable - place it outside of the dnd_area
  3. check if your module(s) is/are enabled for blog listing

hope this helps,

best

Anton

Hi @WGwardjak ,

You have to follow the proper sequence then only dnd area will work also you have to define a different unique class for your every dnd area , through which you can give css as per your requirement as shown in below example

<!-----------------------------Homepage Blog Section Start Here ----------------------------->

{% dnd_area ‘home-blog-module’ class=’home-blog-section’, label=‘Blog Section’ %}

{% dnd_section

padding={

'default': { 'top': '100', 'bottom': '100', 'right': '20', 'left': '20' },

'mobile': { 'top':'60', 'bottom': '60', 'right': '20', 'left': '20' }

},

max\_width=1170

%}

{% dnd\_column %}

  {% dnd\_row  %}

    {% dnd\_module path='../modules/CarouselNew.module',label="CarouselNew Module" %}

    {% end\_dnd\_module %}

  {% end\_dnd\_row %}

{% end\_dnd\_column %}

{% end_dnd_section %}

{% end_dnd_area %}

<!----------------------------- Homepagel Blog Section Ends Here ----------------------------->

<!-----------------------------Homepage other Section Start Here ----------------------------->

{% dnd_area ‘home-other-module’ class=’home-other-section’, label=‘Other Section’ %}

{% dnd_section

………

{% end_dnd_section %}

{% end_dnd_area %}

<!----------------------------- Homepagel Other Section Ends Here ----------------------------->

For More details please read this article:- Drag and Drop Areas HubL Tags - HubSpot docs
Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regard.

Hi @WGwardjak,

Thank you for reaching out to the Community! I’ve moved this to our CMS board to make sure it gets seen by the right experts, I hope you don’t mind.

I noticed that you’ve also posted your question in a comment under this Community post, I’ll leave it here for additional context.

I want to tag a couple of experts to see if they can help out here:

hi @alyssamwilie, @Anton, @prosa, @albertsg, do you have any tips for @WGwardjak? Thank you!

*EDIT: I’ve just seen you posted your question in the CMS board as well and already got help by the wonderful @webdew and @Oezcan. I’ll merge these two posts to avoid duplicate content.

Cheers
Mia, Community Team

Thank you all for your contribution! @webdew response was the solution!

If there is anything I can do for you - let me know :slightly_smiling_face: