Why is Twig Tweak required?

Created on 24 May 2025, about 1 month ago

I don't see any use of twig tweak in the templates, is it really needed?

πŸ’¬ Support request
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mortona2k
  • πŸ‡ΊπŸ‡ΈUnited States jayhuskins

    The Twig Tweak and Token module dependencies are required for the token_replace filter β†’ used in the menu--disclosure.html.twig template file:

        {% if menu_disclosure_button_include_label %}
          <span>{{ menu_disclosure_button_label|token_replace() }}</span>
        {% endif %}
    ...
                    {% if global_context.disclosure_button_include_label == 1 %}
                      <span>
                        {{ global_context.disclosure_button_label|token_replace(
                            {'menu-link': item['original_link'] }
                        )}}
                      </span>
                    {% else %}
    

    This allows site builders to utilize site tokens in the menu disclosure button label and menu link tokens in the sub-menu disclosure button labels. By default, the latter label is More "{{item.title}}" pages, but site builders may want to alter that label text while keeping the respective menu link title, which they can do with the token [menu-link:title] in the Disclosure Menu Block Configuration Form.

  • πŸ‡ΊπŸ‡ΈUnited States jayhuskins
Production build 0.71.5 2024