You are here

function template_preprocess_talkpage in Talk 7

Same name and namespace in other branches
  1. 6 talk.module \template_preprocess_talkpage()

Template preprocess function.

Parameters

$node: The node whose talk page is being displayed.

$add_comments: Boolean that indicates if adding comments is allowed for current user.

File

./talk.module, line 308
Comments are displayed in a separate 'talk' tab, for node types you wish

Code

function template_preprocess_talkpage(&$variables) {
  $node = $variables['node'];
  $variables['title'] = talk_title($node, 'page');
  $comments = theme('talk_comments', array(
    'node' => $node,
  ));
  $variables['comment_count'] = $node->comment_count;
  $variables['comments'] = $comments;
}