twig_theme_test.url_generator.html.twig
Same filename in other branches
- 8.9.x core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.url_generator.html.twig
- 10 core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.url_generator.html.twig
- 11.x core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.url_generator.html.twig
{# Test the url and path twig functions #} <div>path (as route) not absolute: {{ path('user.register') }}</div> <div>url (as route) absolute: {{ url('user.register') }}</div> <div>path (as route) not absolute with fragment: {{ path('user.register', {}, {'fragment': 'bottom' }) }}</div> <div>url (as route) absolute despite option: {{ url('user.register', {}, {'absolute': false }) }}</div> <div>url (as route) absolute with fragment: {{ url('user.register', {}, {'fragment': 'bottom' }) }}</div>
File
-
core/
modules/ system/ tests/ modules/ twig_theme_test/ templates/ twig_theme_test.url_generator.html.twig
View source
- {# Test the url and path twig functions #}
- <div>path (as route) not absolute: {{ path('user.register') }}</div>
- <div>url (as route) absolute: {{ url('user.register') }}</div>
-
- <div>path (as route) not absolute with fragment: {{ path('user.register', {}, {'fragment': 'bottom' }) }}</div>
- <div>url (as route) absolute despite option: {{ url('user.register', {}, {'absolute': false }) }}</div>
- <div>url (as route) absolute with fragment: {{ url('user.register', {}, {'fragment': 'bottom' }) }}</div>
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.