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.
Hi all,
I'd like to write a formatter that I could use in Views with Token.
I'd like to use available tokens from fields I set in my Views.
I have 2 problems :
* token_replace() doesn't replace tokens from view fields but only global tokens
* token helper like token_tree() always show global tokens but not local ones from view fields
Where could I find informations to resolve that ?
Thx for your help
Best regards
Comments
Comment #1
Deciphered CreditAttribution: Deciphered commentedView fields and the fields attached to entities that you see in token tree are completely different things.
You can write a formatter for a standard Drupal field that can be used within a view, but that formatter is not provided with the View as context, only with entity and related information.