开发者

How do I create a custom token in Drupal 7?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜