Hi @bitmap,
Welcome to the Community.
I believe you are looking to add dynamic syntax to your emails. I think that this help article, another help article, and this community post would be good places to start:
Hope that helped,
Alex
Thank you Alex,
But I want an „extra“ dynamic syntax for the „Hey“ in your example. In Germen I want to use „Liebe“ {{ first_name }} if its a woman and „Lieber“ {{ first_name }}if its a Man. And as an default, I want to use a generic salution in case I haven‘t got the name: „Liebe Freunde von …“
Can you help me how to do this? Thanks.
Hi @alex.hong
Tried this if/else but when I sent a test mail, I only get the default text: Any Idea? Thanks
{% if person|lookup:'Frau' %} Liebe {{ first_name }},
{% elif person|lookup:'Mann' %} Lieber {{ first_name }},
{% else %} Liebe Freundin, lieber Freund von THEO & EMMA,
{% endif %}
Hi @bitmap,
I think that would depend on if you have a property on user’s accounts that can be used to switch the type of text block that is shown. If you are not seeing the syntax working, I would make sure you are using a test profile that has a first name or something to look up.
Thanks,
Alex
Hi @alex.hong
thank you. Yes, I have a testprofils with the properties mentioned in the if/else code.
Anrede: Frau / Mann
Firstname: xxx
But … In preview mode, I only get the default, i mean the “else” text. Is there something wrong with the code?
Thanks!
Hi @bitmap,
I believe this text is appearing because you might be previewing the template within the template builder and not from within a campaign or flow. This code will not show up when placed in a campaign or a flow. When you are previewing a template from the template library - that is expected behavior. We have encoded our preview text within every template created.
If you pull your template into a Campaign or Flow and preview from there, that code will not appear. Can you confirm if this is true or not?
Thank you,
Alex