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.

43 lines
2.1 KiB

8 years ago
<style>
.tt-test > div {
margin: 15px;
padding: 10px;
outline: solid 2px dodgerblue;
}
.tt-test > div::before {
content: attr(class);
font-weight: bold;
display: block;
font-style: italic;
border-bottom: solid 1px dodgerblue;
margin-bottom: 10px;
padding-bottom: 5px;
color: dodgerblue;
}
</style>
<div class="tt-test">
8 years ago
<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-block">{{ drupal_block('classy_powered_by_drupal') }}</div>
<div class="tt-region">{{ drupal_region('sidebar_first') }}</div>
8 years ago
<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-form">{{ drupal_form('Drupal\\system\\Form\\CronForm') }}</div>
8 years ago
<div class="tt-token">{{ drupal_token('site:name') }}</div>
<div class="tt-token-data">{{ drupal_token('node:title', {'node': node}) }}</div>
8 years ago
<div class="tt-config">{{ drupal_config('user.settings', 'anonymous') }}</div>
<div class="tt-status-message">{{ drupal_set_message('Hi!', 'warning') }}</div>
<div class="tt-title">{{ drupal_title() }}</div>
8 years ago
<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 class="tt-transliterate">{{ 'Привет!' | transliterate('ru') }}</div>
<div class="tt-check-markup">{{ '<b>bold</b> <strong>strong</strong>' | check_markup('twig_tweak_test') }}</div>
8 years ago
</div>