Same filename in this branch
  1. 10 core/modules/filter/templates/filter-tips.html.twig
  2. 10 core/themes/claro/templates/filter/filter-tips.html.twig
  3. 10 core/themes/olivero/templates/filter/filter-tips.html.twig
  4. 10 core/themes/stable9/templates/content-edit/filter-tips.html.twig
  5. 10 core/themes/starterkit_theme/templates/content-edit/filter-tips.html.twig
  6. 10 core/profiles/demo_umami/themes/umami/templates/classy/content-edit/filter-tips.html.twig
Same filename and directory in other branches
  1. 8.9.x core/modules/filter/templates/filter-tips.html.twig
  2. 9 core/modules/filter/templates/filter-tips.html.twig

Default theme implementation for a set of filter tips.

Available variables:

  • tips: Descriptions and a CSS ID in the form of 'module-name/filter-id' (only used when 'long' is TRUE) for each filter in one or more text formats.
  • long: A flag indicating whether the passed-in filter tips contain extended explanations, i.e. intended to be output on the path 'filter/tips' (TRUE), or are in a short format, i.e. suitable to be displayed below a form element. Defaults to FALSE.
  • multiple: A flag indicating there is more than one filter tip.

See also

template_preprocess_filter_tips()

1 theme call to filter-tips.html.twig
FilterController::filterTips in core/modules/filter/src/Controller/FilterController.php
Displays a page with long filter tips.

File

core/modules/filter/templates/filter-tips.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a set of filter tips.
  5. *
  6. * Available variables:
  7. * - tips: Descriptions and a CSS ID in the form of 'module-name/filter-id'
  8. * (only used when 'long' is TRUE) for each filter in one or more text
  9. * formats.
  10. * - long: A flag indicating whether the passed-in filter tips contain extended
  11. * explanations, i.e. intended to be output on the path 'filter/tips'
  12. * (TRUE), or are in a short format, i.e. suitable to be displayed below a
  13. * form element. Defaults to FALSE.
  14. * - multiple: A flag indicating there is more than one filter tip.
  15. *
  16. * @see template_preprocess_filter_tips()
  17. *
  18. * @ingroup themeable
  19. */
  20. #}
  21. {% if multiple %}
  22. <h2>{{ 'Text Formats'|t }}</h2>
  23. {% endif %}
  24. {% if tips|length %}
  25. {% for name, tip in tips %}
  26. {% if multiple %}
  27. <div{{ attributes }}>
  28. <h3>{{ tip.name }}</h3>
  29. {% endif %}
  30. {% if tip.list|length %}
  31. <ul>
  32. {% for item in tip.list %}
  33. <li{{ tip.attributes }}>{{ item.tip }}</li>
  34. {% endfor %}
  35. </ul>
  36. {% endif %}
  37. {% if multiple %}
  38. </div>
  39. {% endif %}
  40. {% endfor %}
  41. {% endif %}

Related topics