Name Templates
The CZ Names template system lets you compose addressing strings that combine the declined first and last name with gender-conditional text. Templates are used by the UI Extensions to render the final greeting wherever you place them.
Placeholders
Section titled “Placeholders”| Placeholder | Replaced with |
|---|---|
{{czechFirstName}} | Declined first name (from addressing metafield) |
{{czechLastName}} | Declined last name (from last-name-addressing metafield) |
If the first name could not be declined (non-translatable), the app writes no metafields for that customer, so the extension block does not render at all.
Gender conditionals
Section titled “Gender conditionals”You can render different text depending on the customer’s linguistic gender using the conditional block syntax:
{male:text}{female:text}{unknown:text}All three segments are optional. The block is replaced with the segment that matches the customer’s gender (male, female, or unknown). If a segment is omitted, nothing is displayed for that gender — this is often the desired behavior (for example, omitting {unknown:} means unknown-gender names produce no prefix).
Default template
Section titled “Default template”When no custom template is configured, the app uses:
{{czechFirstName}} {{czechLastName}}This produces the declined full name, for example: Jane Novákové.
Template examples
Section titled “Template examples”Full name only (default)
Section titled “Full name only (default)”{{czechFirstName}} {{czechLastName}}Output examples:
Jane NovákovéTomáši Čermáku
Formal Czech greeting (Pane / Paní)
Section titled “Formal Czech greeting (Pane / Paní)”{male:Pane }{female:Paní }{unknown:}{{czechFirstName}} {{czechLastName}}Output examples:
- Male:
Pane Tomáši Čermáku - Female:
Paní Jane Novákové - Unknown:
Janse Smiths
Formal English title (Mr. / Mrs.)
Section titled “Formal English title (Mr. / Mrs.)”{male:Mr. }{female:Mrs. }{unknown:}{{czechFirstName}} {{czechLastName}}Output examples:
- Male:
Mr. Tomáši Čermáku - Female:
Mrs. Jane Novákové
Informal first name only
Section titled “Informal first name only”{male:Ahoj }{female:Ahoj }{unknown:Dobrý den, }{{czechFirstName}}Output examples:
- Male:
Ahoj Tomáši - Female:
Ahoj Jano - Unknown:
Dobrý den, Janse
Email subject line with title
Section titled “Email subject line with title”{male:Vážený pane }{female:Vážená paní }{unknown:Vážený zákazníku}{{czechFirstName}}Output examples:
- Male:
Vážený pane Tomáši - Female:
Vážená paní Jano - Unknown:
Vážený zákazníku
Using templates in Liquid
Section titled “Using templates in Liquid”If you prefer to build the greeting directly in a Liquid template rather than using the UI Extensions, access the metafields individually and construct the string yourself. See Liquid Usage for examples.
- Omitting a gender segment means nothing is displayed for that gender — this is intentional for templates where you want silence rather than a fallback (for example,
{unknown:}produces an empty string for unknown-gender names) - For the
unknowncase, consider using a neutral form likeVážený zákazníkuor simply leaving it empty so only the name renders - Test your template with customers of each gender (male, female, and an untranslatable name like
Alex) to confirm all three branches render correctly