filter-tips.html.twig
Same filename in this branch
- 9 core/themes/olivero/templates/filter/filter-tips.html.twig
- 9 core/themes/stable9/templates/content-edit/filter-tips.html.twig
- 9 core/themes/seven/templates/classy/content-edit/filter-tips.html.twig
- 9 core/themes/claro/templates/filter/filter-tips.html.twig
- 9 core/themes/bartik/templates/classy/content-edit/filter-tips.html.twig
- 9 core/themes/stable/templates/content-edit/filter-tips.html.twig
- 9 core/themes/starterkit_theme/templates/content-edit/filter-tips.html.twig
- 9 core/themes/classy/templates/content-edit/filter-tips.html.twig
- 9 core/modules/filter/templates/filter-tips.html.twig
Same filename in other branches
- 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/content-edit/filter-tips.html.twig
- 8.9.x core/themes/seven/templates/classy/content-edit/filter-tips.html.twig
- 8.9.x core/themes/claro/templates/filter/filter-tips.html.twig
- 8.9.x core/themes/bartik/templates/classy/content-edit/filter-tips.html.twig
- 8.9.x core/themes/stable/templates/content-edit/filter-tips.html.twig
- 8.9.x core/themes/classy/templates/content-edit/filter-tips.html.twig
- 8.9.x core/modules/filter/templates/filter-tips.html.twig
- 10 core/profiles/demo_umami/themes/umami/templates/classy/content-edit/filter-tips.html.twig
- 10 core/themes/olivero/templates/filter/filter-tips.html.twig
- 10 core/themes/stable9/templates/content-edit/filter-tips.html.twig
- 10 core/themes/claro/templates/filter/filter-tips.html.twig
- 10 core/themes/starterkit_theme/templates/content-edit/filter-tips.html.twig
- 10 core/modules/filter/templates/filter-tips.html.twig
- 11.x core/profiles/demo_umami/themes/umami/templates/classy/content-edit/filter-tips.html.twig
- 11.x core/themes/olivero/templates/filter/filter-tips.html.twig
- 11.x core/themes/stable9/templates/content-edit/filter-tips.html.twig
- 11.x core/themes/claro/templates/filter/filter-tips.html.twig
- 11.x core/themes/starterkit_theme/templates/content-edit/filter-tips.html.twig
- 11.x core/modules/filter/templates/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
template_preprocess_filter_tips()
2 theme calls to filter-tips.html.twig
- FilterController::filterTips in core/
modules/ filter/ src/ Controller/ FilterController.php - Displays a page with long filter tips.
- template_preprocess_filter_guidelines in core/
modules/ filter/ filter.module - Prepares variables for text format guideline templates.
File
-
core/
profiles/ demo_umami/ themes/ umami/ templates/ classy/ content-edit/ filter-tips.html.twig
View source
- {#
- /**
- * @file
- * 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 template_preprocess_filter_tips()
- */
- #}
- {% if multiple %}
- <h2>{{ 'Text Formats'|t }}</h2>
- {% endif %}
-
- {% if tips|length %}
- {% if multiple %}
- <div class="compose-tips">
- {% endif %}
-
- {% for name, tip in tips %}
- {% if multiple %}
- {%
- set tip_classes = [
- 'filter-type',
- 'filter-' ~ name|clean_class,
- ]
- %}
- <div{{ tip.attributes.addClass(tip_classes) }}>
- <h3>{{ tip.name }}</h3>
- {% endif %}
-
- {% if tip.list|length %}
- <ul class="tips">
- {% for item in tip.list %}
- {%
- set item_classes = [
- long ? 'filter-' ~ item.id|replace({'/': '-'}),
- ]
- %}
- <li{{ item.attributes.addClass(item_classes) }}>{{ item.tip }}</li>
- {% endfor %}
- </ul>
- {% endif %}
-
- {% if multiple %}
- </div>
- {% endif %}
- {% endfor %}
-
- {% if multiple %}
- </div>
- {% endif %}
- {% endif %}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.