# DnD in blog posttemplate

**URL:** <https://community.hubspot.com/t/dnd-in-blog-posttemplate/130859>\
**Category:** CMS Development\
**Tags:** professional, starter\
**Created:** [April 30, 2025, 2:04pm UTC](https://community.hubspot.com/t/dnd-in-blog-posttemplate/130859 "2025-04-30T14:04:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bblue6](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bblue6](https://community.hubspot.com/u/bblue6)\
**Post date:** [April 30, 2025, 2:04pm UTC](https://community.hubspot.com/t/dnd-in-blog-posttemplate/130859/1 "2025-04-30T14:04:35Z")

</div>

Hello!

> I have read other threads where it was mentioned  
> the dnd\_area function works only in blog\_listing. It doesn’t work in blog\_post templates.

Is this still the case? If not, I am trying to add DnD sections to the blog template, not blog posts, so client can create the blog template the way he wants.  
I’ve been trying some workarounds but getting stopped at  
“The template can’t contain “dnd\_area” modules. Please remove “dnd\_area” on line 14.”  
This is my code:

```lia-code-sample
<!--
 templateType: blog_post
 isAvailableForNewContent: true
 label: Blank
 screenshotPath: ../images/template-previews/blank.png
-->
{% extends "./layouts/base.html" %}

{% block body %}
{% dnd_area "dnd_area"
 label="Main section"
%}

{% end_dnd_area %}
{% endblock body %}

```

But if it can’t be done, then nevermind the code!  
Thanks in advance,  
Ben

---

<div class="post-metadata">

**Author:** ![TomM2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tomm2/32/70887_2.png) [@TomM2](https://community.hubspot.com/u/TomM2)\
**Post date:** [April 30, 2025, 2:49pm UTC](https://community.hubspot.com/t/dnd-in-blog-posttemplate/130859/2 "2025-04-30T14:49:45Z")

</div>

Hey @bblue6 yep! You can’t use D&D areas in email templates and blog post templates according to [the documentation](https://developers.hubspot.com/docs/guides/cms/content/templates/drag-and-drop/overview#:~:text=Drag%20and%20drop%20areas%20can%27t%20be%20used%20in%20blog%20post%20and%20email%20templates.). Blog posts are a big weird to be honest, you can technically add modules into the blog post body, but it will cause a issues usually. Blog posts are pretty static templates as they need to pull the main blog post body info into them.

---

<div class="post-metadata">

**Author:** ![kosalaindrasiri](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kosalaindrasiri/32/44349_2.png) [@kosalaindrasiri](https://community.hubspot.com/u/kosalaindrasiri)\
**Post date:** [April 30, 2025, 3:31pm UTC](https://community.hubspot.com/t/dnd-in-blog-posttemplate/130859/3 "2025-04-30T15:31:52Z")

</div>

Hey @bblue6, As of the latest [HubSpot CMS documentation](https://developers.hubspot.com/docs/cms/building-blocks/templates/drag-and-drop-areas), **drag-and-drop (DnD) areas (dnd\_area) are still not supported in blog\_post templates**. Your code is being rejected with the error:

> * * *
> 
> “The template can’t contain “dnd\_area” modules. Please remove “dnd\_area” on line 14.”
> 
> * * *

because **HubSpot restricts the dnd\_area usage of certain template types** , specifically page, email, and blog\_listing templates, not blog\_post.  
As an alternative, you can use **custom modules** for editable content, but **not dnd\_area**.

---

<div class="post-metadata">

**Author:** ![bblue6](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bblue6](https://community.hubspot.com/u/bblue6)\
**Post date:** [April 30, 2025, 4:54pm UTC](https://community.hubspot.com/t/dnd-in-blog-posttemplate/130859/4 "2025-04-30T16:54:18Z")

</div>

Well i found in the docs, [here](https://developers.hubspot.com/docs/reference/cms/hubl/tags/dnd-areas), that  
_Drag and drop areas can’t be used in blog post and email templates at this time._  
So my questions is what else may come close? Use Smart Content or Custom Modules maybe? I am more than comfortable coding, in any capacity, I just happened to have not done a lot of it here. My end need is for client to be able to use DnD or similar so he can create the blog post template he wants without going in the HTML / code. But i am more than happy to go in there to get any kind of workaround or close match going.  
Thanks!

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [April 30, 2025, 4:58pm UTC](https://community.hubspot.com/t/dnd-in-blog-posttemplate/130859/5 "2025-04-30T16:58:29Z")

</div>

Hey @bblue6,

the blog\_listing supports dnd\_areas, but as the fellow people here mentioned - the blog\_post doesn’t.  
But this doesn’t mean that you can’t have a dnd experience in the blog post.

But there are a few things to keep in mind:  
The “dnd area” for the blog post is

`{{ content.post_body }}`

No wrappers. Just this code.

How it works is that it will allow you/your user to creating the post itself with a “rich-text” but you can drop any module in between the rich-text. The only downside is: It’s only one column, so you can’t have something like “multi-column” layouts…

**unless 😀**

you create custom modules with the desired layout.  
This means, you could have a custom module with 2,3… columns, super crazy setups&functions etc. This will work because it’s one single module.

So simply create a custom module with the desired layout and functionality, make it available for blog posts and you’re good to go

best,

Anton

---

<div class="post-metadata">

**Author:** ![bblue6](https://avatars.discourse-cdn.com/v4/letter/b/45deac/32.png) [@bblue6](https://community.hubspot.com/u/bblue6)\
**Post date:** [April 30, 2025, 7:21pm UTC](https://community.hubspot.com/t/dnd-in-blog-posttemplate/130859/6 "2025-04-30T19:21:54Z")

</div>

Hi again, @Anton I am wanting to try this.  
_How it works is that it will allow you/your user to creating the post itself with a “rich-text” but you can drop any module in between the rich-text. The only downside is: It’s only one column, so you can’t have something like “multi-column” layouts…_

How can i test this? Just add this

`{{ content.post_body }}`

to my blog post template? I can only have one in the account - one blog - so will doing this affect my already published blog posts?

And what do you mean by “in between the rich text”? Maybe i’ll see easily but i needed to be sure about my first point first.

Thanks!

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [April 30, 2025, 8:24pm UTC](https://community.hubspot.com/t/dnd-in-blog-posttemplate/130859/7 "2025-04-30T20:24:24Z")

</div>

Hey @bblue6,

every blog post template should have the

`{{ content.post_body }}`

as this is what allows you to write the actual post. I’ve just calling it Rich-text. Simply because technically, it is one.

As you’re writing the post, you can drop modules in between paragraphs (see screenshot taken from my dev environment)

 ![Bildschirmfoto 2025-04-30 um 21.48.15.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/2/2585747cf9657288fa83e07a5ca7c8207acbdc11.jpeg)

So yeah, you can write a post and drop your (custom) modules in between text.

As you got only one blog, which I assume works perfectly fine, you don’t need to change anything. You can create custom modules and drop them in every blog post as you need it.  
Note: You cannot “predefine” modules and such like in website and other dnd templates. So you’ll need to add modules in every post.

If you want to test and develop things before moving it to live portal, you can create a free developer test account at [developers.hubspot.com](http://developers.hubspot.com) and create up to 10(?) CMS sandbox accounts in a test account. Each CMS sandbox comes with basically enterprise functionality for developing purposes but you cannot use it for production usage. (HubSpot won’t give away fully fletched free enterprise tier accounts).

So if you want to have a seperate dev environment without worrying to destroy something, create a CMS sandbox, develop and test your stuff and once you’re happy, copy it over to the prod account.

best,

Anton
