Skip to content
Twig Field Finder
Theme

Italic values are placeholders: replace them with your own machine names, or let the builder do it.

Reads the entity directly, before field formatters run.

  1. Snippet 1
    {{ node.field_name.value }}
  2. Snippet 2
    {{ node.field_name.0.getPossibleOptions() }}

Reads the content render array, after field formatters run.

  1. Twig
    {{ content.field_name[0]['#markup'] }}

Uses a contrib module’s Twig filter or function.

  1. {{ content.field_name|field_value|first['#markup'] }}

Contrib modules used

See helper modules for what each one provides.