开发者

how to use the token in drupal?

i have installed the token module, but don't know how to use it. i have searched lots o开发者_JAVA百科f time.and don't find some tutorials of it. expect someone can make me an example to use it. especially in views module. thank you.


The token module provides a centralized API for using placeholders that are replaced by text. To start off, I suggest reading the module documentation and see the list of modules that use Token. In essence it takes a token like [user-name] and replaces it to enjoylife or whatever your username is.

You cannot use Token in Views as such. But you can use it in CCK, node body, node title etc. which, in turn, can be used in Views.

One simple example of tokens is the Pathauto module — go to /admin/build/path/pathauto and check any of the 'Node paths' suggestions.


It would help to understand better what you're trying to accomplish with token -- it is mostly used as an API and is therefore a requirement for some really useful Drupal modules like Pathauto as Zerolab suggests.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜