For more information about this repository, visit the project page at https://www.drupal.org/project/twig_tweak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

18 lines
1.3 KiB

<div class="tt-test" style="background-color: lavender">
<div class="tt-view-default">{{ drupal_view('twig_tweak_test') }}</div>
<div class="tt-view-page_1">{{ drupal_view('twig_tweak_test', 'page_1') }}</div>
<div class="tt-view-page_1-with-argument">{{ drupal_view('twig_tweak_test', 'page_1', 1) }}</div>
<div class="tt-entity-default">{{ drupal_entity('node', 1) }}</div>
<div class="tt-entity-teaser">{{ drupal_entity('node', 1, 'teaser') }}</div>
<div class="tt-entity-from-url">{{ drupal_entity('node') }}</div>
<div class="tt-field">{{ drupal_field('body', 'node', 1) }}</div>
<div class="tt-menu-default">{{ drupal_menu('twig-tweak-test') }}</div>
<div class="tt-menu-level">{{ drupal_menu('twig-tweak-test', 2) }}</div>
<div class="tt-menu-depth">{{ drupal_menu('twig-tweak-test', 1, 1) }}</div>
<div class="tt-block">{{ drupal_block('powered_by_drupal') }}</div>
<div class="tt-token">{{ drupal_token('site:name') }}</div>
<div class="tt-config">{{ drupal_config('user.settings', 'anonymous') }}</div>
<div class="tt-token-replace">{{ 'Site name: [site:name]' | token_replace }}</div>
<div class="tt-preg-replace">{{ 'foo' | preg_replace('(foo)', '$1-bar') }}</div>
<div class="tt-image-style">{{ 'public://images/ocean.jpg' | image_style('thumbnail') }}</div>
</div>