开发者

How do I create a custom token in Drupal 7?

开发者 https://www.devze.com 2023-04-07 10:28 出处:网络
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 impleme

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号