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

Reference: https://www.drupal.org/core/beta-changes
Unfrozen changes Unfrozen because it only changes UI text (translatable strings).
Disruption No disruption.

Remaining tasks

Contributor tasks needed
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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

Issue summary: View changes
star-szr’s picture

Status: Needs review » Reviewed & tested by the community

Absolutely. Thanks!

mikeker’s picture

+1. Thanks, xjm!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, vdc-twig-strings.patch, failed testing.

mikeker’s picture

FileSize
2.24 KB

Reroll. 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 to CoreUrl as it doesn't conflict with anything...

xjm’s picture

Status: Needs work » Needs review
xjm’s picture

Status: Needs review » Reviewed & tested by the community

Back to RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

UI strings are not frozen yet. Committed 621d9bf and pushed to 8.0.x. Thanks!

  • alexpott committed 621d9bf on 8.0.x
    Issue #2414685 by xjm, mikeker: Improve references to Twig tokens in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.