Drupal in it's core have lots of tokens which are basically shortcode or placeholder for any kind of information related to Node, User or System itself. Get a complete list of available tokens in Drupal from:
https://www.drupal.org/node/390482
If you need a token which is not in this list then you have to create your own. And yes there are HOOKs available in Drupal to create your own token. You have to create following HOOKs in one of your custom module:
1: hook_token_info
2: hook_tokens($type, $tokens, array $data = array(), array $options = array())
3: token_replace($text, array $data = array(), array $options = array())
For the complete code reference Click here or Click here.
You can also use Custom Token Module.
0 Comment(s)