<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Use of custom html in sections in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Use-of-custom-html-in-sections/m-p/1122087#M42434</link>
    <description>&lt;P&gt;I was testing this and I couldn't get it to work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems HTML inside a dnd_area gets wiped out except for the dnd_X functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if you need formatting, it seems the only option is to apply styling to the dnd_section/dnd_row/dnd_column which might be enough.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% dnd_area "content" label="some Content" %}
	{% dnd_section %}
		{% dnd_column %} 
			{% dnd_row 
				padding={
					"default" : {
					"bottom" : "0px",
					"left" : "0px",
					"right" : "0px",
					"top" : "0px"
				},
				"mobile" : {
					"bottom" : "0px",
					"left" : "0px",
					"right" : "0px",
					"top" : "0px"
				}
				},
			%} 

				{% dnd_module path="@hubspot/rich_text" %}
					{% module_attribute "html" %}
					&amp;lt;p&amp;gt;Some Content here&amp;lt;/p&amp;gt;
					{% end_module_attribute %}
				{% end_dnd_module %}

			{% end_dnd_row %} 
			{% dnd_row
				background_color={
					r: 123,
					g: 123,
					b: 123,
					a: 1.0
				},
				margin={
					"top": 20,
					"bottom": 200
				},
				padding={
					"top": 20,
					"bottom": 20,
					"left": 20,
					"right": 20
				}
			%} 
				{% dnd_module path="@hubspot/button", link="https://google.com" button_text="Google.com" %}{% end_dnd_module %}
			{% end_dnd_row %} 

		{% end_dnd_column %} 

	{% end_dnd_section %}  
{% end_dnd_area %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Mar 2025 16:44:49 GMT</pubDate>
    <dc:creator>MichaelMa</dc:creator>
    <dc:date>2025-03-13T16:44:49Z</dc:date>
    <item>
      <title>Use of custom html in sections</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Use-of-custom-html-in-sections/m-p/1121571#M42423</link>
      <description>&lt;P&gt;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 &lt;STRONG&gt;dnd_section&lt;/STRONG&gt; tag), but Hubspot seems to be ignoring it completely! When dropped onto the page editor it just adds an extra '&lt;SPAN&gt;Drop modules here&lt;/SPAN&gt;' placeholder instead of the actual section template contents.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that there's a way to use custom html within a &lt;STRONG&gt;dnd_section&lt;/STRONG&gt; using &lt;STRONG&gt;rich_text&lt;/STRONG&gt; module, but in this case it is impossible to arrange buttons/forms modules inside.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it even possible to use section template like the following?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% dnd_section %}
&amp;lt;section&amp;gt;
  &amp;lt;p&amp;gt;some static content&amp;lt;/p&amp;gt;
  &amp;lt;div class='cta'&amp;gt;
    {% dnd_module path='../modules/button' %}{% end_dnd_module %}
  &amp;lt;/div&amp;gt;
  &amp;lt;div class='form'&amp;gt;
    {% dnd_module path='../modules/form' %}{% end_dnd_module %}
  &amp;lt;/div&amp;gt;
&amp;lt;/section&amp;gt;
{% end_dnd_section %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 16:59:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Use-of-custom-html-in-sections/m-p/1121571#M42423</guid>
      <dc:creator>AS21</dc:creator>
      <dc:date>2025-03-12T16:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Use of custom html in sections</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Use-of-custom-html-in-sections/m-p/1121665#M42427</link>
      <description>&lt;P&gt;Just a quick question: Is this code wrapped in a dnd_area?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/reference/cms/hubl/tags/dnd-areas" target="_blank"&gt;https://developers.hubspot.com/docs/reference/cms/hubl/tags/dnd-areas&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2025 19:58:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Use-of-custom-html-in-sections/m-p/1121665#M42427</guid>
      <dc:creator>MichaelMa</dc:creator>
      <dc:date>2025-03-12T19:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Use of custom html in sections</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Use-of-custom-html-in-sections/m-p/1121863#M42428</link>
      <description>&lt;P&gt;I think so, the page template I'm trying to drop section on, has the {% dnd_area %}. It goes like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;!--
    templateType: page
    label: Blank page
    isAvailableForNewContent: true
--&amp;gt;
&amp;lt;!doctype html&amp;gt;
&amp;lt;html lang="{{ html_lang }}" {{ html_lang_dir }}&amp;gt;
    &amp;lt;head&amp;gt;
        ...
        {{ standard_header_includes }}
    &amp;lt;/head&amp;gt;
    &amp;lt;body class="{{ builtin_body_classes }}"&amp;gt;
        {% dnd_area "dnd_area" label="Main" %}

        {% end_dnd_area %}
        {{ standard_footer_includes }}
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Mar 2025 08:21:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Use-of-custom-html-in-sections/m-p/1121863#M42428</guid>
      <dc:creator>AS21</dc:creator>
      <dc:date>2025-03-13T08:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Use of custom html in sections</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Use-of-custom-html-in-sections/m-p/1122087#M42434</link>
      <description>&lt;P&gt;I was testing this and I couldn't get it to work either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems HTML inside a dnd_area gets wiped out except for the dnd_X functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if you need formatting, it seems the only option is to apply styling to the dnd_section/dnd_row/dnd_column which might be enough.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% dnd_area "content" label="some Content" %}
	{% dnd_section %}
		{% dnd_column %} 
			{% dnd_row 
				padding={
					"default" : {
					"bottom" : "0px",
					"left" : "0px",
					"right" : "0px",
					"top" : "0px"
				},
				"mobile" : {
					"bottom" : "0px",
					"left" : "0px",
					"right" : "0px",
					"top" : "0px"
				}
				},
			%} 

				{% dnd_module path="@hubspot/rich_text" %}
					{% module_attribute "html" %}
					&amp;lt;p&amp;gt;Some Content here&amp;lt;/p&amp;gt;
					{% end_module_attribute %}
				{% end_dnd_module %}

			{% end_dnd_row %} 
			{% dnd_row
				background_color={
					r: 123,
					g: 123,
					b: 123,
					a: 1.0
				},
				margin={
					"top": 20,
					"bottom": 200
				},
				padding={
					"top": 20,
					"bottom": 20,
					"left": 20,
					"right": 20
				}
			%} 
				{% dnd_module path="@hubspot/button", link="https://google.com" button_text="Google.com" %}{% end_dnd_module %}
			{% end_dnd_row %} 

		{% end_dnd_column %} 

	{% end_dnd_section %}  
{% end_dnd_area %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 16:44:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Use-of-custom-html-in-sections/m-p/1122087#M42434</guid>
      <dc:creator>MichaelMa</dc:creator>
      <dc:date>2025-03-13T16:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use of custom html in sections</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Use-of-custom-html-in-sections/m-p/1122246#M42435</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/590347"&gt;@AS21&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;technical background:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% dnd_section %}&lt;/LI-CODE&gt;
&lt;P&gt;will drop any kind of static html as it support only other dnd_elements.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;There are 3 options you can still achieve your desired outcome:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a &lt;A href="https://developers.hubspot.com/docs/guides/cms/content/templates/drag-and-drop/sections#create-reusable-sections" target="_blank" rel="noopener"&gt;reusable DND section template&lt;/A&gt; and add a class to it. &lt;STRONG&gt;DND sections outside the dnd section template don't support classes&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;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&lt;/LI&gt;
&lt;LI&gt;Create something like a settings module which will have some JS to modify the section it is put in... (not recommended)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 21:29:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Use-of-custom-html-in-sections/m-p/1122246#M42435</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2025-03-13T21:29:23Z</dc:date>
    </item>
  </channel>
</rss>

