Add counter to comments I would like to add a coutner to comments, so when I view a node I've something like:


Comment #1 - Text 
Comment #2 - Text 
Comment #3 - Text

and so on..



Is there a way to obtain this?
Obviously #1, #2 and #3 are number relative to every singole node.

Thanks!
Override comment.tpl.php and add the following to it:

&lt;?php print 'Comment #' . $id; ?&gt;


(You obviously add it to the spot in the template where you want the comment number to appear.)

Here is the contents of my override for comment.tpl.php for Bartik;

&lt;div class="&lt;?php print $classes; ?&gt; clearfix"&lt;?php print $attributes; ?&gt;&gt;

  &lt;div class="attribution"&gt;

    &lt;?php print $picture; ?&gt;

    &lt;div class="submitted"&gt;
      &lt;p class="commenter-name"&gt;
        &lt;?php print $author; ?&gt;
        &lt;?php print 'comment #' . $id; ?&gt;
      &lt;/p&gt;
      &lt;p class="comment-time"&gt;
        &lt;?php print $created; ?&gt;
      &lt;/p&gt;
      &lt;p class="comment-permalink"&gt;
        &lt;?php print $permalink; ?&gt;
      &lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="comment-text"&gt;
    &lt;div class="comment-arrow"&gt;&lt;/div&gt;

    &lt;?php if ($new): ?&gt;
      &lt;span class="new"&gt;&lt;?php print $new; ?&gt;&lt;/span&gt;
    &lt;?php endif; ?&gt;

    &lt;?php print render($title_prefix); ?&gt;
    &lt;h3&lt;?php print $title_attributes; ?&gt;&gt;&lt;?php print $title; ?&gt;&lt;/h3&gt;
    &lt;?php print render($title_suffix); ?&gt;

    &lt;div class="content"&lt;?php print $content_attributes; ?&gt;&gt;
      &lt;?php
        // We hide the comments and links now so that we can render them later.
        hide($content['links']);
        print render($content);
      ?&gt;
      &lt;?php if ($signature): ?&gt;
      &lt;div class="user-signature clearfix"&gt;
        &lt;?php print $signature; ?&gt;
      &lt;/div&gt;
      &lt;?php endif; ?&gt;
    &lt;/div&gt; &lt;!-- /.content --&gt;

    &lt;?php print render($content['links']); ?&gt;
  &lt;/div&gt; &lt;!-- /.comment-text --&gt;
&lt;/div&gt;