composer require drupal/twig_tweak

Test on


Experience needed
Twig Tweak

Twig Tweak module provides a Twig extension with some useful functions and filters that can improve development experience.

Some examples:

Render a single entity field
{{ drupal_field('field_image', 'node', 1) }}

Get value from the config
{{ drupal_config('', 'name') }}

Cheat sheet


Project type

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Only images hosted on this site may be used in <img> tags.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.