I'd like to be able to do automatic title generation for books using the book title (already in the page title) and the author name. Would it be easy to add a token to provide the author name?

From looking at the Token API docs (http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/token/API.t...), it looks like the code for the token hook is as follows (a sample):

function my_user_token_values($type, $object = NULL, $options = array()) {
  if ($type == 'user') {
    $user = $object;
    $tokens['name']      = $user->name;
    $tokens['mail']      = $user->mail;
    return $tokens;
  }
}

Comments

MGParisi’s picture

Status: Active » Closed (fixed)

Will not be supporting the token module. Sorry.