<?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: How to add ID to dnd Heading module to allow custom styling? in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/790191#M34045</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/521245"&gt;@drewspotshubs&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you happen to have access to the module editor for this module in design tools?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If so and this is a local module, my suggestion would be to add a Boolean that decides if the heading can get the gradient or not. This way you have the option to not only apply the gradient to this specific banner but to others in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this header is coming from a theme and you are unable to edit the module, my route would normally be to create my own custom module with the functionality that's needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another possible option you could take is targeting the banner with the blog-id class that's added in the body-wrapper (look for the CSS class "&lt;SPAN&gt;hs-blog-id-113922225786" in your source). I don't recommend this as a great approach though, as the ID might be subject to change and you have very little flexibility with this path.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Happy to clarify any of the above if it would help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2023 21:09:37 GMT</pubDate>
    <dc:creator>SFurlong</dc:creator>
    <dc:date>2023-05-04T21:09:37Z</dc:date>
    <item>
      <title>How to add ID to dnd Heading module to allow custom styling?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/790122#M34044</link>
      <description>&lt;P&gt;I have a hero style header on &lt;A href="https://news.radiantcu.org" target="_blank"&gt;https://news.radiantcu.org&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A similar page on our site has a gradient overlay on the hero/background image to improve readability of the page H1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;&lt;A href="https://www.radiantcu.org/accounts/checking.shtml" target="_blank"&gt;https://www.radiantcu.org/accounts/checking.shtml&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The heading module by default only allows me to choose between a background gradient OR a background image.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My thought is to add an ID to *this* particular module's html so I can go into the theme-overrides CSS and add the styling I need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried doing that with the classes, but that doesn't really work for various reasons.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is much appreciated, thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 19:55:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/790122#M34044</guid>
      <dc:creator>drewspotshubs</dc:creator>
      <dc:date>2023-05-04T19:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to add ID to dnd Heading module to allow custom styling?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/790191#M34045</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/521245"&gt;@drewspotshubs&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you happen to have access to the module editor for this module in design tools?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If so and this is a local module, my suggestion would be to add a Boolean that decides if the heading can get the gradient or not. This way you have the option to not only apply the gradient to this specific banner but to others in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this header is coming from a theme and you are unable to edit the module, my route would normally be to create my own custom module with the functionality that's needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another possible option you could take is targeting the banner with the blog-id class that's added in the body-wrapper (look for the CSS class "&lt;SPAN&gt;hs-blog-id-113922225786" in your source). I don't recommend this as a great approach though, as the ID might be subject to change and you have very little flexibility with this path.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Happy to clarify any of the above if it would help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 21:09:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/790191#M34045</guid>
      <dc:creator>SFurlong</dc:creator>
      <dc:date>2023-05-04T21:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to add ID to dnd Heading module to allow custom styling?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/791039#M34073</link>
      <description>&lt;P&gt;I'm somewhat familiar with front-end web development, but modules in Hubspot I'm still figuring out. Is there a handy guide for duplicating an existing module and customizing it?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 13:01:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/791039#M34073</guid>
      <dc:creator>drewspotshubs</dc:creator>
      <dc:date>2023-05-08T13:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to add ID to dnd Heading module to allow custom styling?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/791227#M34078</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/521245"&gt;@drewspotshubs&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the easiest (and friendliest) way to duplicate a module is to head over to the design-tools, right-click on it and select "clone"&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you create a new one - a custom headline module is a very easy one.&lt;/P&gt;
&lt;P&gt;Open your theme in the design-tools, right-click on the module folder(recommended) and select "new file in modules". Select Module from the drop down, hit "next" and put in a few informations like&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;where you'd like to use it(you can select multiple options)
&lt;UL&gt;
&lt;LI&gt;pages: Websites and Landing Pages&lt;/LI&gt;
&lt;LI&gt;Blog listing: Blog listing&lt;/LI&gt;
&lt;LI&gt;Blog post: Blog posts&lt;/LI&gt;
&lt;LI&gt;Emails: Emails - &lt;STRONG&gt;EMail modules doesn't support dedicated CSS or JS files&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;Quotes: Quotes&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Select if it's a local or global module
&lt;UL&gt;
&lt;LI&gt;local module: can be used multiple times on every page and can have individual content (like headlines)&lt;/LI&gt;
&lt;LI&gt;global modules: can be used multiple times on each page but the content will be the same (good if you want to display the same content over and over again and change it globally)&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;name (Custom Headline would be a good fit, but it's completly up to you)&lt;/LI&gt;
&lt;LI&gt;Hit next and&amp;nbsp;you've created your (first) module &lt;span class="lia-unicode-emoji" title=":party_popper:"&gt;🎉&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2023-05-08 um 19.45.41.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/90510i08FEF84CF3233F84/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2023-05-08 um 19.45.41.png" alt="Bildschirmfoto 2023-05-08 um 19.45.41.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2023-05-08 um 19.46.05.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/90511iF099FBE78D7AE786/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2023-05-08 um 19.46.05.png" alt="Bildschirmfoto 2023-05-08 um 19.46.05.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2023-05-08 um 19.55.29.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/90513i79765D3D8F9023EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2023-05-08 um 19.55.29.png" alt="Bildschirmfoto 2023-05-08 um 19.55.29.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now you're seeing the module creation screen&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2023-05-08 um 19.56.22.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/90514i905689203576339A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2023-05-08 um 19.56.22.png" alt="Bildschirmfoto 2023-05-08 um 19.56.22.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The dark area is seperated into 3 subareas(unless you select Email for the module - then it will be one area)&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;module.html(HTML+Hubl)&lt;/LI&gt;
&lt;LI&gt;module.css&lt;/LI&gt;
&lt;LI&gt;module.js&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Almost everything can be written in the first (HTML+Hubl) area. There are some best-practises when to write something in HTML+Hubl or in module.css/module.js but they're irrelevant for now&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the right you'll find the "settings" sidebar where you configure your module.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The "fields" section is one of the most important sections here since you'll add the functions here which you'll see while editing the module at page-builder level.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a custom headline you'll need&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Choice field (Headline-tag)&lt;/LI&gt;
&lt;LI&gt;Choice field (Headline-style;optional)&lt;/LI&gt;
&lt;LI&gt;Text element (don't recommend rich-text)&lt;/LI&gt;
&lt;LI&gt;Text element for your ID
&lt;P&gt; &lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The choice field(s) should look like this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2023-05-08 um 20.09.33.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/90516i2B9BDC9B493DE487/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2023-05-08 um 20.09.33.png" alt="Bildschirmfoto 2023-05-08 um 20.09.33.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Tipp: You can create one and clone it. Also you can reorder by drag&amp;amp;drop them. The order will be the same on page-builder level.&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After you've create the fields it should look like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2023-05-08 um 20.13.56.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/90518iA1350E7C596F3C24/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2023-05-08 um 20.13.56.png" alt="Bildschirmfoto 2023-05-08 um 20.13.56.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now it's time to put those fields to function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Write your layout in the module.html(HTML+Hubl) area like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2023-05-08 um 20.16.17.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/90519i5C46DC3A0433DAAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2023-05-08 um 20.16.17.png" alt="Bildschirmfoto 2023-05-08 um 20.16.17.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;{{ module.headline_tag }} class="{{ module.headline_style }}" id="{{ module.headline_id }}"&amp;gt;{{ module.headline }}&amp;lt;/{{ module.headline_tag }}&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(there are many ways how to write this, but imo this is the most begginer friendly one)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What does each field do?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;headline_tag&lt;/EM&gt; defines the H-tag of the headline so the headline will be a H1, H2, H3...&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;headline_style&lt;/EM&gt; defines the class of the headline (H-tags shouldn't be used for styling)&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;headline_id&lt;/EM&gt; defines an ID&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;headline&lt;/EM&gt; prints your text into the H-tag&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Publish the module and you're good to go. &lt;span class="lia-unicode-emoji" title=":party_popper:"&gt;🎉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also: If you want to dive deeper into development - here some ressources&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://developers.hubspot.com/docs/cms/hubl" target="_blank" rel="noopener"&gt;Hubl overview&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/if-statements" target="_blank" rel="noopener"&gt;if-statements&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://developers.hubspot.com/docs/cms/building-blocks/modules/configuration" target="_blank" rel="noopener"&gt;Configuring a module&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this guide helps you&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>Mon, 08 May 2023 18:25:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/791227#M34078</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2023-05-08T18:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to add ID to dnd Heading module to allow custom styling?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/791817#M34102</link>
      <description>&lt;P&gt;This was amazing helpful, thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My next question though, which I need to find the answer for, is how I style the section div that Hubspot automatically generates when I drag the new headline module onto a page. Any advice there?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for this guide, very very helpful.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 20:24:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/791817#M34102</guid>
      <dc:creator>drewspotshubs</dc:creator>
      <dc:date>2023-05-09T20:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to add ID to dnd Heading module to allow custom styling?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/793483#M34155</link>
      <description>&lt;P&gt;You're welcome!&lt;/P&gt;
&lt;P&gt;When hovering a section you'll see some icons in the top left corner of it. Click on the pen icon and you'll get the styling options.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2023-05-13 um 22.38.18.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/90891iF717719FD0EFD53F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2023-05-13 um 22.38.18.png" alt="Bildschirmfoto 2023-05-13 um 22.38.18.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another option would be to create &lt;A href="https://developers.hubspot.com/docs/cms/building-blocks/templates/drag-and-drop-areas/sections" target="_blank" rel="noopener"&gt;predefined sections&lt;/A&gt; in your theme. Those can have custom CSS classes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The last option you have is to create "custom row modules" that contain all elements of this particular section and look like a whole section. It's an old technique dating back to "pre theme" times.&lt;/P&gt;
&lt;P&gt;Since you're creating a module you can do what ever you want. Add styling options and classes. While IDs can be added I don't recommend them for tech. SEO reasons - unless you make them dynamic.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note: those "row modules" are good if you want to limit the user to a specific use-case of the column.&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>Sat, 13 May 2023 20:50:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-add-ID-to-dnd-Heading-module-to-allow-custom-styling/m-p/793483#M34155</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2023-05-13T20:50:03Z</dc:date>
    </item>
  </channel>
</rss>

