Replacement tokens from the first row are empty in views header and footer

Created on 28 May 2025, 10 days ago

When adding a text zone in a view header or footer and checking 'Use replacement tokens from the first row', tokens are replaced but theirs value are empty.
Cloning the display and replacing style with Unformatted list makes tokens be replaced.
Thank you.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @marieAscomedia
  • 🇺🇸United States flashwebcenter Austin TX

    Thank you for the report.

    In Views header/footer, if you add a field using Global: Text area or Global: Unfiltered text, there is an option called "Use replacement tokens from the first row." The default tokens will not work in this case.

    The reason the tokens appear empty is because the view header/footer does not have raw access to the first row’s field values when the output is rendered through a custom Twig template, as is the case with this module.

    I’ve updated the plugin to explicitly expose these fields for token replacement. I’ve tested this functionality with common fields such as title, body, and image, and the new [vvja:field_name] token format now renders correctly.

    I updated the readme and the homepage, also I added description under module settings:

    Please feel free to test it on your end and let me know if it works as expected.

    Best regards,
    Alaa

Production build 0.71.5 2024