Skip to content

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.

PlaceholderReplaced with
{{czechFirstName}}Declined first name (from addressing metafield)
{{czechLastName}}Declined last name (from last-name-addressing metafield)

If a name could not be declined (non-translatable), the original name is used as a fallback.

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).

When no custom template is configured, the app uses:

{{czechFirstName}} {{czechLastName}}

This produces the declined full name, for example: Jane Novákové.

{{czechFirstName}} {{czechLastName}}

Output examples:

  • Jane Novákové
  • Tomáši Čermáku

{male:Pane }{female:Paní }{unknown:}{{czechFirstName}} {{czechLastName}}

Output examples:

  • Male: Pane Tomáši Čermáku
  • Female: Paní Jane Novákové
  • Unknown: Janse Smiths

{male:Mr. }{female:Mrs. }{unknown:}{{czechFirstName}} {{czechLastName}}

Output examples:

  • Male: Mr. Tomáši Čermáku
  • Female: Mrs. Jane Novákové

{male:Ahoj }{female:Ahoj }{unknown:Dobrý den, }{{czechFirstName}}

Output examples:

  • Male: Ahoj Tomáši
  • Female: Ahoj Jano
  • Unknown: Dobrý den, Janse

{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

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 unknown case, consider using a neutral form like Vážený zákazníku or 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