Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Follow-up to #2342287: Allow Twig in Views token replacement:
- The UI refers to a list of tokens as "Twig tokens", but it can include both the Twig-compatible render (field) tokens, and non-Twig-compatible argument tokens.
- In the field rewrite form, the UI tells the user that "HTML or Twig" can be entered, but a site builder would not necessarily know what Twig is.
Proposed resolution
- Remove the UI reference to "Twig" in the token list.
- Link the field rewrite reference to "Twig" to the Twig documentation.
Beta phase evaluation
Unfrozen changes | Unfrozen because it only changes UI text (translatable strings). |
---|---|
Disruption | No disruption. |
Remaining tasks
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Manually test the patch | Novice | Instructions | |
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards | Novice | Instructions |
User interface changes
The word "Twig" is now linked in the field rewrite help text:
The word "Twig" is removed from the token list description:
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#5 | vdc-twig-ui-2414685-5.patch | 2.24 KB | mikeker |
vdc-twig-strings.patch | 2.51 KB | xjm | |
Comments
Comment #1
xjmComment #2
star-szrAbsolutely. Thanks!
Comment #3
mikeker CreditAttribution: mikeker commented+1. Thanks, xjm!
Comment #5
mikeker CreditAttribution: mikeker commentedReroll.
Drupal\Core\Url
was added as part of #2368653: Replace _l in all places (3) besides one., though I'm not sure why it was renamed toCoreUrl
as it doesn't conflict with anything...Comment #6
xjmComment #7
xjmBack to RTBC.
Comment #8
alexpottUI strings are not frozen yet. Committed 621d9bf and pushed to 8.0.x. Thanks!