Skip to content

Instantly share code, notes, and snippets.

@raphaellarrinaga
raphaellarrinaga / drupal_8_twig_cheatsheet.md
Last active July 20, 2023 21:21
[Drupal 8 Twig cheatsheet] #tags: drupal8, twig, cheatsheet

Drupal 8 Twig cheatsheet

Please note I created that sheet as a personal side note/draft and not everything is fully tested. There could be errors or better things to do. So if you spot something wrong or something that can be improved, feel free to comment below and I will do the changes.

Getting Drupal 8 field values in Twig

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