0

I'm writing my own file formatter which is supposed to be Token-compatible. As it will be also used on taxonomy term pages, it should accept taxonomy term token. What am I doing wrong in hook_field_formatter_settings_form by saying:

'#token_types' => array('node', 'taxonomy_term')

so that I don't get term-related tokens at all? Cleared cache many a time. Preferably, I would like the tokens to appear contextually: taxonomy term - when managing display of taxonomy term page, node - when managing display of a node page. Can this be done?

1 Answer 1

0

The surpising answer was: '#token_types' => array('node', 'term') Thanks to davereid!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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