twig_theme_test.link_generator.html.twig

Same filename in other branches
  1. 8.9.x core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.link_generator.html.twig
  2. 10 core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.link_generator.html.twig
  3. 11.x core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.link_generator.html.twig
<div>link via the linkgenerator: {{ link('register', test_url) }}</div>
<div>link via the linkgenerator: {{ link('register', test_url, {'foo': 'bar'}) }}</div>
<div>link via the linkgenerator: {{ link('register', test_url_attribute, {'id': 'kitten'}) }}</div>
<div>link via the linkgenerator: {{ link('register', 'route:user.register', {'id': 'kitten'}) }}</div>
<div>link via the linkgenerator: {{ link('register', 'route:user.register', attributes) }}</div>
{% set title %}<span>register</span>{% endset %}
<div>link via the linkgenerator: {{ link(title, test_url) }}</div>
{% set title %}<span>register</span><svg></svg>{% endset %}
<div>link via the linkgenerator: {{ link(title, test_url) }}</div>
<div>link via the linkgenerator: {{ link('register', test_url_attribute) }} {{ link('register', test_url_attribute) }}</div>

File

core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.link_generator.html.twig

View source
  1. <div>link via the linkgenerator: {{ link('register', test_url) }}</div>
  2. <div>link via the linkgenerator: {{ link('register', test_url, {'foo': 'bar'}) }}</div>
  3. <div>link via the linkgenerator: {{ link('register', test_url_attribute, {'id': 'kitten'}) }}</div>
  4. <div>link via the linkgenerator: {{ link('register', 'route:user.register', {'id': 'kitten'}) }}</div>
  5. <div>link via the linkgenerator: {{ link('register', 'route:user.register', attributes) }}</div>
  6. {% set title %}<span>register</span>{% endset %}
  7. <div>link via the linkgenerator: {{ link(title, test_url) }}</div>
  8. {% set title %}<span>register</span><svg></svg>{% endset %}
  9. <div>link via the linkgenerator: {{ link(title, test_url) }}</div>
  10. <div>link via the linkgenerator: {{ link('register', test_url_attribute) }} {{ link('register', test_url_attribute) }}</div>

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.