<?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 If statement to check list/contact membership status in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/192090#M6187</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In HubSpot you can create smart CTAs that display based on contact list membership.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if/how this could be executed as an if statement within a HubL template. For example; if user is in contact list display this content else display something else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Benji&lt;/P&gt;</description>
    <pubDate>Thu, 31 May 2018 15:21:57 GMT</pubDate>
    <dc:creator>benji_thecroc</dc:creator>
    <dc:date>2018-05-31T15:21:57Z</dc:date>
    <item>
      <title>If statement to check list/contact membership status</title>
      <link>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/192090#M6187</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In HubSpot you can create smart CTAs that display based on contact list membership.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if/how this could be executed as an if statement within a HubL template. For example; if user is in contact list display this content else display something else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Benji&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 15:21:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/192090#M6187</guid>
      <dc:creator>benji_thecroc</dc:creator>
      <dc:date>2018-05-31T15:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: If statement to check list/contact membership status</title>
      <link>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/192259#M6197</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/54367"&gt;@benji_thecroc&lt;/a&gt;&amp;nbsp;- great question!&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/5053"&gt;@benvanlooy&lt;/a&gt;&amp;nbsp;do you know if this is possible?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 14:38:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/192259#M6197</guid>
      <dc:creator>roisinkirby</dc:creator>
      <dc:date>2018-06-01T14:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: If statement to check list/contact membership status</title>
      <link>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/192443#M6215</link>
      <description>&lt;P&gt;This is certainly possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should use the hulb IF/Statements in combination with the Hubspot Develerop Info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefor, visit your page while logged in and open Developer info - see if you can find properties that show the user is known or not.&amp;nbsp; (probably contact email or so).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use this value in your IF/Else statement &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;Developer Info:&lt;/P&gt;&lt;P&gt;&lt;A href="https://designers.hubspot.com/docs/hubl/how-to-use-developer-info-on-cos-pages" target="_blank"&gt;https://designers.hubspot.com/docs/hubl/how-to-use-developer-info-on-cos-pages&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF/ELSE&lt;/P&gt;&lt;P&gt;&lt;A href="https://designers.hubspot.com/docs/hubl/if-statements" target="_blank"&gt;https://designers.hubspot.com/docs/hubl/if-statements&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 09:18:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/192443#M6215</guid>
      <dc:creator>benvanlooy</dc:creator>
      <dc:date>2018-06-04T09:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: If statement to check list/contact membership status</title>
      <link>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/299149#M14126</link>
      <description>&lt;P&gt;It's like this:&lt;/P&gt;&lt;P&gt;You can use a text field (module.list_id) to store the list id that you can get from the url of list.&amp;nbsp;They look like this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://app.hubspot.com/contacts/PORTALID/lists/" target="_blank"&gt;https://app.hubspot.com/contacts/PORTALID/lists/&lt;/A&gt;&lt;FONT color="#FF0000"&gt;1323&lt;/FONT&gt;?&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in the above case the list id is 1323. Then use the&amp;nbsp;request_contact.list_memberships variable that stores a list of all lists the contact is in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{% if module.list_id in request_contact.list_memberships %}

{% cta guid="{{ module.cta_for_list }}" %}

{% else %}

{% cta guid="{{ module.cta_for_everyone_else }}" %}

{% endif %}&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Oct 2019 00:33:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/299149#M14126</guid>
      <dc:creator>adriancblack</dc:creator>
      <dc:date>2019-10-29T00:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: If statement to check list/contact membership status</title>
      <link>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/395450#M20214</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/165"&gt;@adriancblack&lt;/a&gt;&amp;nbsp;This is brilliant! Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 22:40:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/395450#M20214</guid>
      <dc:creator>iliascarre</dc:creator>
      <dc:date>2020-12-22T22:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: If statement to check list/contact membership status</title>
      <link>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/412006#M21339</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/165"&gt;@adriancblack&lt;/a&gt;&amp;nbsp;I got this working earlier but it does not seem to be working anymore for some reason. I can't get any of my tests to work. Do you have a quick way to test whether this logic is still working within the module? Any help would be appreciated. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 21:31:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/412006#M21339</guid>
      <dc:creator>iliascarre</dc:creator>
      <dc:date>2021-02-23T21:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: If statement to check list/contact membership status</title>
      <link>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/412092#M21343</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/165"&gt;@adriancblack&lt;/a&gt;&amp;nbsp;Sorry to keep pinging you but I wanted to let you know I found and posted a solution incase you needed it for anything:&amp;nbsp;&lt;A href="https://community.hubspot.com/t5/CMS-Development/Check-member-list-to-display-specific-content-in-a-module/m-p/412083" target="_blank"&gt;https://community.hubspot.com/t5/CMS-Development/Check-member-list-to-display-specific-content-in-a-module/m-p/412083&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 03:03:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/412092#M21343</guid>
      <dc:creator>iliascarre</dc:creator>
      <dc:date>2021-02-24T03:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: If statement to check list/contact membership status</title>
      <link>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/412380#M21359</link>
      <description>&lt;P&gt;thank you for sharing&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/149808"&gt;@iliascarre&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 16:11:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/If-statement-to-check-list-contact-membership-status/m-p/412380#M21359</guid>
      <dc:creator>sharonlicari</dc:creator>
      <dc:date>2021-02-24T16:11:00Z</dc:date>
    </item>
  </channel>
</rss>

