Apr 30, 2020 10:49 AM
Dear Hubspot staff:
We wanted to send our clients a mail conditioning the text to the value of the the property lang. So it will display the text on the right language. We used this syntax as we saw in the following arcticle, and it should work:
https://designers.hubspot.com/docs/hubl/if-statements#using-elif-and-else
{% if ticket.idioma == 'Portugués' %}
Whatever text in portuguese
{% endif %}
But this is not working. If we write these sencences, they display the following results.
{{ ticket.idioma }} ---------> Portugués
{{ ticket.idioma == 'Portugués' }} ---> false
So this is a bit confusing. We would appreciate any help.
Thanks in advance!
May 7, 2020 10:53 AM
Hi, @jgil.
Unlike HubSpot CMS pages and blogs, personalization variables cannot be used within HubL if
statements in emails at this time.
This limitation is highlighted at the beginning of this documentation:
Please note that using personalization variables (contact and company variables) within if
statements is not currently supported for email in HubSpot. These variables can be used for logic on HubSpot CMS pages and blog templates.
Apologies for the confusion and inconvenience.
While it is not yet possible, adding conditional and looping HubL support to Hubspot emails is a priority for the team. That said, they are not yet at a stage where we can offer definitive dates.
If you haven't already, I recommend subscribing to the Developer Changelog so that you are notified once this functionality becomes publicly available.
Isaac TakushiAssociate Certification Manager |