Skip to content
Twig Field Finder
Theme

Term — parent term

Open in builder

This is a property of the entity itself, so there’s no field name to fill in.

Reads the entity directly, before field formatters run. Only works in taxonomy-term.html.twig.

  1. Snippet 1
    {{ term.parent.entity.label() }}
  2. Snippet 2
    {{ term.parent.target_id }}

Gotcha

Top-level terms have parent 0 and no parent entity.