Variables Available in commenttplphp

The system provides the following variables for the eomment. tpl. php template.



$comment (object)



$directory $id









Name of comment's author with a link to the author profile.

The comment object.

The body of the comment.

Formatted creation date of the post.

The relative path to the directory in which the theme is located.

Sequential ID of the comment displayed (first comment is 1, second comment is 2, etc.).

True if the front page is currently being displayed, false if not.

The links below the comment.

Text for 'new' (where the comment is new).

HTML for user's picture.

The Submitted by text.

Link to the comment title.

Creates alternating label for comments ('odd' and 'even').

A list of both current and superseded variables available for the comment template is maintained on the official Drupal site at

Was this article helpful?

0 0

Post a comment