<?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 Contact Property If Statement in Email in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/1895#M190</link>
    <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I am attempting to create an email that shows content based on contact properties, but for some reason the if statements don't seem to work. If I put in the HUBL for the contact property it will show up, but the if statement will not.&lt;/P&gt;&lt;P&gt;Here is the code from the email template:&lt;/P&gt;&lt;PRE&gt;{{contact.do_you_have_small_children_or_pets_}}
{% if contact.do_you_have_small_children_or_pets_ == 'Yes' %}
&amp;lt;p&amp;gt;Text for small children and pets.&amp;lt;/p&amp;gt;
{% endif %}
{{contact.are_the_windows_in_a_hard_to_reach_spot_}}
{% if contact.are_the_windows_in_a_hard_to_reach_spot_ == 'Yes' %}
&amp;lt;p&amp;gt;Text for hard to reach windows.&amp;lt;/p&amp;gt;
{% endif %}&lt;/PRE&gt;&lt;P&gt;I know the contact properties are correct and are loading because I get the double 'Yes' in the email if I send it as if it is going to the user with the 2 Yes properties. I am thinking there is a problem with the if statement or I am not reading the contact property field properly. Sorry I usually work with PHP.&lt;/P&gt;&lt;P&gt;If anyone has any ideas I would greatly appreciate it.&lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2016 19:55:35 GMT</pubDate>
    <dc:creator>fcomstoc</dc:creator>
    <dc:date>2016-12-01T19:55:35Z</dc:date>
    <item>
      <title>Contact Property If Statement in Email</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/1895#M190</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I am attempting to create an email that shows content based on contact properties, but for some reason the if statements don't seem to work. If I put in the HUBL for the contact property it will show up, but the if statement will not.&lt;/P&gt;&lt;P&gt;Here is the code from the email template:&lt;/P&gt;&lt;PRE&gt;{{contact.do_you_have_small_children_or_pets_}}
{% if contact.do_you_have_small_children_or_pets_ == 'Yes' %}
&amp;lt;p&amp;gt;Text for small children and pets.&amp;lt;/p&amp;gt;
{% endif %}
{{contact.are_the_windows_in_a_hard_to_reach_spot_}}
{% if contact.are_the_windows_in_a_hard_to_reach_spot_ == 'Yes' %}
&amp;lt;p&amp;gt;Text for hard to reach windows.&amp;lt;/p&amp;gt;
{% endif %}&lt;/PRE&gt;&lt;P&gt;I know the contact properties are correct and are loading because I get the double 'Yes' in the email if I send it as if it is going to the user with the 2 Yes properties. I am thinking there is a problem with the if statement or I am not reading the contact property field properly. Sorry I usually work with PHP.&lt;/P&gt;&lt;P&gt;If anyone has any ideas I would greatly appreciate it.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 19:55:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/1895#M190</guid>
      <dc:creator>fcomstoc</dc:creator>
      <dc:date>2016-12-01T19:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Contact Property If Statement in Email</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/1930#M192</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/1154"&gt;@fcomstoc&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if statements with contact properties don't work in email templates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you conditionals are blocks of text or paragraphs, you can use multiple rich text modules and smart content in your email template to achieve similar results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example structure&lt;/P&gt;&lt;P&gt;Main Email body module (1st paragraph, static text)&lt;/P&gt;&lt;P&gt;Rich Text module, Smart Content (2nd paragraph, conditional 1)&lt;/P&gt;&lt;P&gt;Rich Text (3rd paragraph, static text)&lt;/P&gt;&lt;P&gt;Rich Text&amp;nbsp; module, Smart Content (4rd paragraph, conditional 2)&lt;/P&gt;&lt;P&gt;Rich Text (closing and signature, static text)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not the most user friendly approach, but has worked for me several times.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 12:47:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/1930#M192</guid>
      <dc:creator>ndwilliams3</dc:creator>
      <dc:date>2016-12-02T12:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Contact Property If Statement in Email</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/1935#M193</link>
      <description>&lt;P&gt;Was about to write the same but&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/366"&gt;@ndwilliams3&lt;/a&gt;&amp;nbsp;was a little quicker than me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe some additional Infos about how to create Smart Content in emails:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Segment your different groups&amp;nbsp;of contacts in different lists (f.e. List1: property 1 = yes, List2: property 2 = yes)&amp;nbsp;&lt;/STRONG&gt;&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="Bildschirmfoto 2016-12-02 um 13.50.18.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/529i9FB097DA5A12F91E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2016-12-02 um 13.50.18.png" alt="Bildschirmfoto 2016-12-02 um 13.50.18.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Rich-Text-Modules in emails can be made smart (based on lists or lifecycle-stages):&lt;/STRONG&gt;&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="Bildschirmfoto 2016-12-02 um 13.52.33.png" style="width: 314px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/530iFFE614D113161FC8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2016-12-02 um 13.52.33.png" alt="Bildschirmfoto 2016-12-02 um 13.52.33.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. Choose your Lists and create a different email copy for each group of contacts.&lt;/STRONG&gt;&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="Bildschirmfoto 2016-12-02 um 13.52.56.png" style="width: 628px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/531iB8AFA672A506655B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2016-12-02 um 13.52.56.png" alt="Bildschirmfoto 2016-12-02 um 13.52.56.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 2016-12-02 um 13.57.25.png" style="width: 997px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/532i5A8AA1582D528BE1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bildschirmfoto 2016-12-02 um 13.57.25.png" alt="Bildschirmfoto 2016-12-02 um 13.57.25.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 13:16:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/1935#M193</guid>
      <dc:creator>ThomasReitz</dc:creator>
      <dc:date>2016-12-02T13:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Contact Property If Statement in Email</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/2018#M209</link>
      <description>&lt;P&gt;Thank you for the information, I expect that is probably the way I will have to do it, it just seems stupid to create 6 lists for something that chould be a simple if/then. Of couse I did also have to create 7 workflows to calculate the answers because in HS you cant have simultaneous if/then statements. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 23:30:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/2018#M209</guid>
      <dc:creator>fcomstoc</dc:creator>
      <dc:date>2016-12-02T23:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Contact Property If Statement in Email</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/8490#M872</link>
      <description>&lt;P&gt;&lt;img id="manmad" class="emoticon emoticon-manmad" src="https://community.hubspot.com/i/smilies/16x16_man-mad.png" alt="Man Mad" title="Man Mad" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can make lists if it's one variable... What if I need to generate an email based on multiple questions with multiple answers each? ??&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 03:14:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/8490#M872</guid>
      <dc:creator>Dawid</dc:creator>
      <dc:date>2017-02-28T03:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Contact Property If Statement in Email</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/287637#M13385</link>
      <description>&lt;P&gt;I totally agree!!&lt;BR /&gt;&lt;BR /&gt;This is in no way professional email marketing.&lt;/P&gt;&lt;P&gt;If you agree, too, please support this idea which queries for if statements in HUBL for emails:&lt;/P&gt;&lt;DIV&gt;&lt;A href="https://community.hubspot.com/t5/HubSpot-Ideas/if-statements-in-email-templates/idi-p/282907" target="_blank"&gt;https://community.hubspot.com/t5/HubSpot-Ideas/if-statements-in-email-templates/idi-p/282907&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;Thank you very much!&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Aug 2019 08:16:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Contact-Property-If-Statement-in-Email/m-p/287637#M13385</guid>
      <dc:creator>BiG</dc:creator>
      <dc:date>2019-08-23T08:16:04Z</dc:date>
    </item>
  </channel>
</rss>

