{% set image_attributes = {style: 'width: 30px; height 30px;'} %}
{{ drupal_view('twig_tweak_test') }}
{{ drupal_view('twig_tweak_test', 'page_1') }}
{{ drupal_view('twig_tweak_test', 'page_1', 1) }}
{{ drupal_view_result('twig_tweak_test', 'page_1')|length }}
{{ drupal_block('system_branding_block', {use_site_name: false}, false) }}
{{ drupal_block('system_branding_block', {label: 'Branding'}) }}
{{ drupal_region('highlighted') }}
{{ drupal_entity('node', 1) }}
{{ drupal_entity('node', 1, 'teaser') }}
{{ drupal_entity('node', 'ad1b902a-344f-41d1-8c61-a69f0366dbfa') }}
{{ drupal_entity('node', 'zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz') }}
{{ drupal_entity_form('node', values={type: 'page'}) }}
{{ drupal_entity_form('node', 1) }}
{{ drupal_field('body', 'node', 1) }}
{{ drupal_menu('twig-tweak-test') }}
{{ drupal_menu('twig-tweak-test', 2) }}
{{ drupal_menu('twig-tweak-test', 1, 1) }}
{{ drupal_form('Drupal\\system\\Form\\CronForm') }}
{{ drupal_image(1, attributes=image_attributes) }}
{{ drupal_image('public://image-test.png', attributes=image_attributes) }}
{{ drupal_image('b2c22b6f-7bf8-4da4-9de5-316e93487518', attributes=image_attributes) }}
{{ drupal_image(1, 'thumbnail', image_attributes) }}
{{ drupal_image(1, 'example', image_attributes, true) }}
{{ drupal_token('site:name') }}
{{ drupal_token('node:title', {'node': node}) }}
{{ drupal_config('user.settings', 'anonymous') }}
{{ drupal_title() }}
{{ drupal_url('node/1', {absolute: true}) }}
{{ drupal_url('node/1', {absolute: true, langcode: 'ru'}) }}
{{ drupal_url('https://example.com/node?foo=bar', {query: {page: 1}, fragment: 'here'}) }}
{{ drupal_messages() }}
{{ drupal_breadcrumb() }}
{{ 'Site name: [site:name]'|token_replace }}
{{ 'FOO'|preg_replace('/(foo)/i', '$1-bar') }}
{{ 'public://images/ocean.jpg'|image_style('thumbnail') }}
{{ 'Привет!'|transliterate('ru') }}
{{ 'bold strong'|check_markup('twig_tweak_test') }}
{{ 12345|format_size }}
{{ 'Hello world!'|truncate(10, true, true) }}
{{ {'#markup':'Example'}|with('#prefix', '')|with('#suffix', '') }}
{{ {alpha: {beta: {gamma: 123}}}|with(['alpha', 'beta', 'gamma'], 456)|json_encode|replace({'"':''}) }}
'|data_uri('image/svg+xml') }}" alt="{{ 'Rectangle'|t }}" style="height: 50px;"/>
{%- set build = { 're': {'#markup': 're'}, '#sol': {'#markup': '#sol'}, 'mi': {'#markup': 'mi'}, '#fa': {'#markup': '#fa'}, 'do': {'#markup': 'do', '#weight': -10}, } -%} {%- for value in build|children(true) -%} {{- value -}} {%- endfor -%}
{{ node|view }}
{{ node.title|view }}
{{ node.title[0]|view }}
{{ node.field_image|file_uri }}
{{ node.field_image[0]|file_uri }}
{% set media_uri = node.field_media|file_uri %}
{{ media_uri }}
{% if media_uri is not null %}
{{ media_uri|image_style('thumbnail') }}
{% endif %}
{{ 'public://image-test.png'|file_url }}
{{ 'public://image-test.png'|file_url(false) }}
{{ node.field_image|file_url }}
{{ node.field_image[0]|file_url }}
{{ node.field_media|file_url }}
{{ node|entity_url(options={fragment: 'test'}) }}
{{ node|entity_url(options={absolute: true}) }}
{{ node|entity_url('edit-form') }}
{{ (node|translation).title.value }}
{{ foo('bar') }}
{{ 'foo'|bar }}
{{ 'ok' is ok ? 'Yes' : 'No' }}