<?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: Trouble Combining Two Custom Modules in HubSpot Email Templates in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Trouble-Combining-Two-Custom-Modules-in-HubSpot-Email-Templates/m-p/1109339#M42178</link>
    <description>&lt;P&gt;Hey, &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/899721"&gt;@talfaropro&lt;/a&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Can you add your code example directly into the post body? There is a code block tool in the editor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2025-02-14 at 10.08.32@2x.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/138529i23D897AEF229F683/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2025-02-14 at 10.08.32@2x.png" alt="CleanShot 2025-02-14 at 10.08.32@2x.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;It's challenging to troubleshoot code from only a screenshot (you didn't do anything wrong, I want to give our community members more to work with)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks! — Jaycee&lt;/P&gt;</description>
    <pubDate>Fri, 14 Feb 2025 17:11:12 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2025-02-14T17:11:12Z</dc:date>
    <item>
      <title>Trouble Combining Two Custom Modules in HubSpot Email Templates</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Trouble-Combining-Two-Custom-Modules-in-HubSpot-Email-Templates/m-p/1108866#M42161</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm having trouble combining two custom modules that I built for an email template in HubSpot. Each module works fine on its own, but when I try to merge them, the layout gets messed up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect the issue might be related to the &amp;lt;style&amp;gt; tags inside the HTML code, since CSS isn't allowed in email modules. However, I’m not entirely sure if that's the root cause or if something else is interfering with the rendering.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attached screenshots to show how the modules look separately vs. how they appear when combined. Any insights or suggestions on how to properly merge these without breaking the layout would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Custom Module 1" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/138446i8509B03BD75E782A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Module 2.png" alt="Custom Module 1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Custom Module 1&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Custom Module 2" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/138447i66EE7481781C2C79/image-size/large?v=v2&amp;amp;px=999" role="button" title="Module 1.png" alt="Custom Module 2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Custom Module 2&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Combine Modules (broken)" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/138448iE05400FACD839B0D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Combined Modules.png" alt="Combine Modules (broken)" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Combine Modules (broken)&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Custom Module 1 HTML code" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/138449i5B01865EE413ED22/image-size/large?v=v2&amp;amp;px=999" role="button" title="Custom Module HTML.png" alt="Custom Module 1 HTML code" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Custom Module 1 HTML code&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2025 20:31:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Trouble-Combining-Two-Custom-Modules-in-HubSpot-Email-Templates/m-p/1108866#M42161</guid>
      <dc:creator>talfaropro</dc:creator>
      <dc:date>2025-02-13T20:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Combining Two Custom Modules in HubSpot Email Templates</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Trouble-Combining-Two-Custom-Modules-in-HubSpot-Email-Templates/m-p/1109339#M42178</link>
      <description>&lt;P&gt;Hey, &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/899721"&gt;@talfaropro&lt;/a&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Can you add your code example directly into the post body? There is a code block tool in the editor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2025-02-14 at 10.08.32@2x.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/138529i23D897AEF229F683/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2025-02-14 at 10.08.32@2x.png" alt="CleanShot 2025-02-14 at 10.08.32@2x.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;It's challenging to troubleshoot code from only a screenshot (you didn't do anything wrong, I want to give our community members more to work with)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks! — Jaycee&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 17:11:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Trouble-Combining-Two-Custom-Modules-in-HubSpot-Email-Templates/m-p/1109339#M42178</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2025-02-14T17:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Combining Two Custom Modules in HubSpot Email Templates</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Trouble-Combining-Two-Custom-Modules-in-HubSpot-Email-Templates/m-p/1109343#M42179</link>
      <description>&lt;P&gt;of course! Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Custom Module #1&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="property-card"&amp;gt;
  &amp;lt;img src="{{ module.property_image.src }}" alt="Property Image" class="property-image"&amp;gt;
  
  &amp;lt;div class="property-details"&amp;gt;
    &amp;lt;h2 class="tenant-name"&amp;gt;{{ module.tenant_name }}&amp;lt;/h2&amp;gt;
    &amp;lt;p class="city-state"&amp;gt;{{ module.city_state }}&amp;lt;/p&amp;gt;
    &amp;lt;div class="property-info"&amp;gt;
      &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Purchase Price:&amp;lt;/strong&amp;gt; {{ module.purchase_price }}&amp;lt;/p&amp;gt;
      &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Cap Rate:&amp;lt;/strong&amp;gt; {{ module.cap_rate }}&amp;lt;/p&amp;gt;
      &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Rent:&amp;lt;/strong&amp;gt; {{ module.rent }}&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;a href="{{ module.listing_link }}" class="view-listing"&amp;gt;View Listing&amp;lt;/a&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;style&amp;gt;
  .property-card {
  display: flex;
  align-items: center;
  background: #f4f4f4;
  border-radius: 8px;
  padding: 15px;
  max-width: 650px;
  margin: auto;
  font-family: Tahoma, sans-serif;
  height: 140px; /* Matches the image height */
}

.property-image {
  width: 220px;
  height: 140px;
  object-fit: cover;
  border-radius: 5px;
}

.property-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 140px;
  padding-left: 15px;
  max-width: 220px; /* Prevents text from extending beyond the image width */
}

.tenant-name {
  font-size: 16px;
  font-weight: bold;
  color: #003c4c;
  margin-bottom: 0px;
  line-height: 1; /* Reduces vertical spacing */
}

.city-state {
  font-size: 13px;
  color: #666;
  margin-top: -3px; /* Pulls City, State even closer to Tenant */
}

.property-info {
  font-size: 13px;
  color: #000;
  line-height: 1.5;
}

.property-info p {
  margin: 4px 0; /* Keeps spacing consistent */
}

.view-listing {
  font-size: 12px;
  font-weight: bold;
  color: #0073e6;
  text-decoration: none;
  margin-top: 5px; 
  align-self: flex-start; /* Ensures it stays within the text box */
}

@media (max-width: 600px) {
  .property-card {
    flex-direction: column;
    text-align: center;
    height: auto;
  }

  .property-image {
    width: 100%;
    max-width: 300px;
    height: auto;
  }

  .property-details {
    height: auto;
    text-align: center;
    max-width: 100%; /* Reset width for mobile */
  }
}&amp;lt;/style&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Custom Module #2&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="property-card"&amp;gt;
  &amp;lt;img src="{{ module.property_image.src | default('https://via.placeholder.com/280x292?text=No+Image') }}" 
       alt="Property Image" class="property-image"&amp;gt;
  &amp;lt;h2 class="tenant-name"&amp;gt;{{ module.tenant_name }}&amp;lt;/h2&amp;gt;
  &amp;lt;p class="city-state"&amp;gt;{{ module.city_state }}&amp;lt;/p&amp;gt;
  &amp;lt;div class="property-info"&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Purchase Price:&amp;lt;/strong&amp;gt; {{ module.purchase_price }}&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Cap Rate:&amp;lt;/strong&amp;gt; {{ module.cap_rate }}&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Rent:&amp;lt;/strong&amp;gt; {{ module.rent }}&amp;lt;/p&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;a href="{{ module.listing_link }}" class="view-listing"&amp;gt;View Listing&amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;style&amp;gt;
  .property-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligns text to the left */
    border-radius: 8px;
    padding: 10px;
    text-align: left; /* Ensures all text is left-aligned */
    max-width: 280px;
    font-family: Tahoma, sans-serif;
    background: transparent; /* Removes any background */
  }

  .property-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 5px;
  }

  .tenant-name {
    font-size: 16px;
    font-weight: bold;
    color: #003c4c;
    margin-bottom: 0px;
  }

  .city-state {
    font-size: 13px;
    color: #666;
    margin-top: -3px;
    margin-bottom: 8px;
  }

  .property-info {
    font-size: 13px;
    color: #000;
    line-height: 1.3;
  }

  .property-info p {
    margin: 3px 0;
  }

  .view-listing {
    font-size: 12px;
    font-weight: bold;
    color: #0073e6;
    text-decoration: none;
    display: block;
    margin-top: 5px;
  }
&amp;lt;/style&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 17:14:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Trouble-Combining-Two-Custom-Modules-in-HubSpot-Email-Templates/m-p/1109343#M42179</guid>
      <dc:creator>talfaropro</dc:creator>
      <dc:date>2025-02-14T17:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Combining Two Custom Modules in HubSpot Email Templates</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Trouble-Combining-Two-Custom-Modules-in-HubSpot-Email-Templates/m-p/1109565#M42184</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/899721"&gt;@talfaropro&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see a few potential issues.&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Most EMail clients won't render &amp;lt;style&amp;gt;-tags outside of the &amp;lt;head&amp;gt;-tag. Therefore it's still best-practise to use inline-styling&lt;/LI&gt;
&lt;LI&gt;Best practise for layouts is - unfortunately - still tables instead of &amp;lt;divs&amp;gt;&lt;/LI&gt;
&lt;LI&gt;The majority of clients have problems with flex-box.&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My recommendation is to create your desired layout the dnd editor, (send your self a test mail), preview the web-version, inspect the source-code, grab the layout with the hs- classes, paste it into your custom module and go from there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're looking for "pixel perfect" solutions, I'm recommending to use html-email-templates instead of dnd emails.&lt;/P&gt;
&lt;P&gt;To have good (and responsive) template, I recommend to use &lt;A href="http://mjml.io" target="_blank" rel="noopener"&gt;mjml.io&lt;/A&gt;. Once your template is build, you can change the static image/text info to HubSpot modules to have the option to change the content.&lt;/P&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>Sat, 15 Feb 2025 11:01:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Trouble-Combining-Two-Custom-Modules-in-HubSpot-Email-Templates/m-p/1109565#M42184</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2025-02-15T11:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble Combining Two Custom Modules in HubSpot Email Templates</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Trouble-Combining-Two-Custom-Modules-in-HubSpot-Email-Templates/m-p/1110898#M42200</link>
      <description>&lt;P&gt;Thanks Anton - to be honest, I am not a coder at all, and used CHATGPT to help me build these modules. What would you recommend moving forward? Using MJML for it?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 19:42:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Trouble-Combining-Two-Custom-Modules-in-HubSpot-Email-Templates/m-p/1110898#M42200</guid>
      <dc:creator>talfaropro</dc:creator>
      <dc:date>2025-02-18T19:42:08Z</dc:date>
    </item>
  </channel>
</rss>

