0

I make custom token which i use in view filter but now i want to use in view header.The custom token doesn't show in view header Global: Unfiltered text (Global: Unfiltered text) or how i make "Available global token replacements" to use in view header Global: Unfiltered text (Global: Unfiltered text). Thanks in advance.

1

One possible soliton is to simply when declaring your custom tokens in hook_token_info()

use $info['tokens']['view']

Ex:

$info['tokens'] = [
    'view' => [
       'my-custom-token' => [
          'name' => t('Custom Token'),
          'description' => t('A custom token I created.'),
       ],
       // 'my-second-custom-token' => [...
    ],
];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.