bad_help_topics.url_func_used.html.twig

Same filename and directory in other branches
  1. 11.x core/modules/help/tests/modules/help_topics_test/bad_help_topics/syntax/bad_help_topics.url_func_used.html.twig
  2. 10 core/modules/help/tests/modules/help_topics_test/bad_help_topics/syntax/bad_help_topics.url_func_used.html.twig
---
label: 'URL test topic that uses outdated url function'
top_level: true
---
{% set link_uses_url_func = render_var(url('valid.route')) %}
<p>{% trans %}This topic should be top-level. It is used to test URLs{% endtrans %}</p>
<ul>
  <li>{% trans %}Valid link, but generated with <code>url()</code> instead of <code>help_route_link()</code> or <code>help_topic_link()</code>: {{ link_uses_url_func }}{% endtrans %}</li>
</ul>

File

core/modules/help/tests/modules/help_topics_test/bad_help_topics/syntax/bad_help_topics.url_func_used.html.twig

View source
  1. ---
  2. label: 'URL test topic that uses outdated url function'
  3. top_level: true
  4. ---
  5. {% set link_uses_url_func = render_var(url('valid.route')) %}
  6. <p>{% trans %}This topic should be top-level. It is used to test URLs{% endtrans %}</p>
  7. <ul>
  8. <li>{% trans %}Valid link, but generated with <code>url()</code> instead of <code>help_route_link()</code> or <code>help_topic_link()</code>: {{ link_uses_url_func }}{% endtrans %}</li>
  9. </ul>

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