filter-tips.html.twig

Same filename in this branch
  1. main core/profiles/demo_umami/themes/umami/templates/classy/content-edit/filter-tips.html.twig
  2. main core/themes/stable9/templates/content-edit/filter-tips.html.twig
  3. main core/themes/claro/templates/filter/filter-tips.html.twig
  4. main core/themes/starterkit_theme/templates/content-edit/filter-tips.html.twig
  5. main core/modules/filter/templates/filter-tips.html.twig
  6. main core/themes/admin/templates/filter/filter-tips.html.twig
  7. main core/themes/default_admin/templates/filter/filter-tips.html.twig
Same filename and directory in other branches
  1. 10 core/profiles/demo_umami/themes/umami/templates/classy/content-edit/filter-tips.html.twig
  2. 10 core/themes/olivero/templates/filter/filter-tips.html.twig
  3. 10 core/themes/stable9/templates/content-edit/filter-tips.html.twig
  4. 10 core/themes/claro/templates/filter/filter-tips.html.twig
  5. 10 core/themes/starterkit_theme/templates/content-edit/filter-tips.html.twig
  6. 11.x core/profiles/demo_umami/themes/umami/templates/classy/content-edit/filter-tips.html.twig
  7. 11.x core/themes/olivero/templates/filter/filter-tips.html.twig
  8. 11.x core/themes/stable9/templates/content-edit/filter-tips.html.twig
  9. 11.x core/themes/claro/templates/filter/filter-tips.html.twig
  10. 11.x core/themes/starterkit_theme/templates/content-edit/filter-tips.html.twig
  11. 11.x core/modules/filter/templates/filter-tips.html.twig
  12. 10 core/modules/filter/templates/filter-tips.html.twig
  13. 9 core/profiles/demo_umami/themes/umami/templates/classy/content-edit/filter-tips.html.twig
  14. 9 core/themes/olivero/templates/filter/filter-tips.html.twig
  15. 9 core/themes/stable9/templates/content-edit/filter-tips.html.twig
  16. 9 core/themes/seven/templates/classy/content-edit/filter-tips.html.twig
  17. 9 core/themes/claro/templates/filter/filter-tips.html.twig
  18. 9 core/themes/bartik/templates/classy/content-edit/filter-tips.html.twig
  19. 9 core/themes/stable/templates/content-edit/filter-tips.html.twig
  20. 9 core/themes/starterkit_theme/templates/content-edit/filter-tips.html.twig
  21. 9 core/themes/classy/templates/content-edit/filter-tips.html.twig
  22. 9 core/modules/filter/templates/filter-tips.html.twig
  23. 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/content-edit/filter-tips.html.twig
  24. 8.9.x core/themes/seven/templates/classy/content-edit/filter-tips.html.twig
  25. 8.9.x core/themes/claro/templates/filter/filter-tips.html.twig
  26. 8.9.x core/themes/bartik/templates/classy/content-edit/filter-tips.html.twig
  27. 8.9.x core/themes/stable/templates/content-edit/filter-tips.html.twig
  28. 8.9.x core/themes/classy/templates/content-edit/filter-tips.html.twig
  29. 8.9.x core/modules/filter/templates/filter-tips.html.twig
  30. 11.x core/themes/admin/templates/filter/filter-tips.html.twig
  31. 11.x core/themes/default_admin/templates/filter/filter-tips.html.twig

Theme override 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

claro_preprocess_filter_tips()

1 theme call to filter-tips.html.twig
FilterThemeHooks::preprocessFilterGuidelines in core/modules/filter/src/Hook/FilterThemeHooks.php
Prepares variables for text format guideline templates.

File

core/themes/olivero/templates/filter/filter-tips.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override 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 claro_preprocess_filter_tips()
  17. */
  18. #}
  19. {% if multiple %}
  20. <h2>{{ 'Text Formats'|t }}</h2>
  21. {% endif %}
  22. {% if tips|length %}
  23. {% if multiple %}
  24. <div class="compose-tips">
  25. {% endif %}
  26. {% for name, tip in tips %}
  27. {% if multiple %}
  28. {%
  29. set tip_classes = [
  30. 'compose-tips__item',
  31. 'compose-tips__item--name-' ~ name|clean_class,
  32. ]
  33. %}
  34. <div{{ tip.attributes.addClass(tip_classes) }}>
  35. {% endif %}
  36. {% if multiple or long %}
  37. <h3>{{ tip.name }}</h3>
  38. {% endif %}
  39. {% if tip.list|length %}
  40. <ul class="filter-tips {{ long ? 'filter-tips--long' : 'filter-tips--short' }}">
  41. {% for item in tip.list %}
  42. {%
  43. set item_classes = [
  44. 'filter-tips__item',
  45. long ? 'filter-tips__item--long' : 'filter-tips__item--short',
  46. long ? 'filter-tips__item--id-' ~ item.id|clean_class,
  47. ]
  48. %}
  49. <li{{ item.attributes.addClass(item_classes) }}>{{ item.tip }}</li>
  50. {% endfor %}
  51. </ul>
  52. {% endif %}
  53. {% if multiple %}
  54. </div>
  55. {% endif %}
  56. {% endfor %}
  57. {% if multiple %}
  58. </div>
  59. {% endif %}
  60. {% endif %}

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