You are here

token.html.twig in Bamboo Twig 8.2

<div class="test-token">

  <!-- Substitute Token -->
  <h2>Substitute Token</h2>
  <hr>
  <div class="token-site">{{ bamboo_token('site:name') }}</div>

  {% set article = bamboo_load_entity('node', 1) %}
  <div class="token-node">{{ bamboo_token('node:title', {'node': article}) }}</div>

</div>

File

tests/modules/bamboo_twig_test/templates/token.html.twig
View source
  1. <div class="test-token">
  2. <!-- Substitute Token -->
  3. <h2>Substitute Token</h2>
  4. <hr>
  5. <div class="token-site">{{ bamboo_token('site:name') }}</div>
  6. {% set article = bamboo_load_entity('node', 1) %}
  7. <div class="token-node">{{ bamboo_token('node:title', {'node': article}) }}</div>
  8. </div>