Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Install
Works with Drupal: 8.xUsing Composer to manage Drupal site dependencies
Alternative installation files
Download twig_tweak-8.x-2.4.tar.gztar.gz
25.52 KB
MD5: 43381430f0344f04d173fba9733772f2
SHA-1: 54ad8fa1eb6efd63ff4a68391087e8cfd47f6479
SHA-256: 22ca0319e13cf5e389cabdad22ada8c5c21b774a46a6a2ea38f43ba8bf3369ed
Download twig_tweak-8.x-2.4.zipzip
38.6 KB
MD5: 1ee9862b1f783d49b8133f6a78293f4b
SHA-1: fa175b46d2b69ce0f30344579a5861169c8467a4
SHA-256: e24292aa4d7194cb3e1dade6a85bcac783759518d1b1afba2ee3354fd0b2b8fd
Release notes
Minimum Drupal core version is set to 8.7.
#2924925: File url from media entity
Added a new
file_url
filter to help extracting file URL form fields.
{{ node.field_image|file_url }}
{{ node.field_media|file_url }}
#3053556: image_style doesn't support SVG
image_style
now triggers an error when the specified image style is missing or cannot be applied to the provided image.
with
filter now supports setting nested array values.{{ content|with(['field_image', '#title'], 'Photo'|t) }}
Added new function
contextual_links
to help with rendering contextual links.
<div class="contextual-region">
{{ contextual_links('entity.view.edit_form:view=frontpage&display_id=page_1') }}
{{ drupal_view('frontpage') }}
</div>
Deprecated loading entities from URL.
The following code will trigger deprecation notice.
{{ drupal_entity('node' }}
Instead, specify entity ID explicitly. Use preprocess hook to supply the template with entity object if necessary.
{{ drupal_entity('node', node.id }}