HHH Posted July 24, 2019 Share Posted July 24, 2019 When using variables in emails I can set so it's empty if the Variable does not exist, for example {{Customer Contact.H_jobtitle|empty}} Is it possible to default to a hard coded value instead? Something along the lines of {{Customer Contact.H_jobtitle|"Mr."}} so that if the customer does not have a title the email displays Mr. Link to comment Share on other sites More sharing options...
Victor Posted July 26, 2019 Share Posted July 26, 2019 @HHH sure you can. Use ESP conditions: https://wiki.hornbill.com/index.php/Email_Templates Tip: once you have a read through, just to get an idea on how this works, the condition you would need is like this: <esp-condition contenteditable="false" expression="'{{Customer Contact.H_jobtitle}}' LIKE '%Customer Contact.H_jobtitle%'">Mr.</esp-condition> I know is not obvious why you need that but you do. Just try it and see how it works EDIT: Btw, the above is an ESP expression from when the email templates is viewed in "Source" mode Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now