How to create a custom token in Drupal 7?

I need to create a custom token that can get a value from a nids-based mapping table. I need to know the hooks that I have to implement in order to create a custom token.

+6
source share
1 answer

You will need to implement hook_token_info () and hook_tokens .

The best you can do is load the example module , there is a module called token_example with a well-commented code example on how to correctly implement markers.

+7
source

Source: https://habr.com/ru/post/897958/


All Articles