We’re looking to use signature templates with custom variables, but can’t find a syntax to add a constant string only when a variable is populated. Front’s variable syntax resembles Twig, but it doesn’t seem to be compatible.
If a title exists, we want:
{{user.name}}, {{user.custom.title}}
If no title exists, we want:
{{user.name}}
Not:
{{user.name}},
Same thing for phone numbers. Bonus points if you can tell me syntax to conditionally include a carriage return.
This sample {{recipient.first_name | 'there'}}
from the article gives me hope that it’s possible, but we need the opposite (text if exists) or to be able to inject a variable between strings. This is what I really want to do:
{{user.custom.direct} ? ‘Direct ’ + {user.custom.direct} : ‘ | ’}Main 555-555-5555