Skip to content

Instantly share code, notes, and snippets.

@ojchris
ojchris / README.md
Created September 27, 2018 15:22 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@ojchris
ojchris / drupal_8_twig_cheatsheet.md
Created May 26, 2020 18:16 — forked from raphaellarrinaga/drupal_8_twig_cheatsheet.md
[Drupal 8 Twig cheatsheet] #tags: drupal8, twig, cheatsheet

Drupal 8 Twig cheatsheet

Getting Drupal 8 field values in Twig

Image path: {{ file_url(content.field_name['#items'].entity.uri.value) }}

Image title text: {{ node.field_name.title }}

Entity Reference path: {{ content.field_tags[0]['#url'] }}