I need to create a custom token that can fetch a value from a mapping table based on nids. I need to know the hooks I should implement to create the custom token.
You'll need to implement hook_token_info() and hook_tokens.
The best thing you can do is download the Examples module, there's a module called token_example
with well commented example code for how to implement tokens properly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With