comment.tpl.php

Same filename in this branch
  1. 7.x themes/bartik/templates/comment.tpl.php
  2. 7.x modules/comment/comment.tpl.php
1 theme call to comment.tpl.php
comment_view in modules/comment/comment.module
Generate an array for rendering the given comment.

File

themes/garland/comment.tpl.php

View source
<div class="<?php

print $classes . ' ' . $zebra;
?>"<?php

print $attributes;
?>>

  <div class="clearfix">

    <span class="submitted"><?php

print $submitted;
?></span>

  <?php

if ($new) {
    ?>
    <span class="new"><?php

    print drupal_ucfirst($new);
    ?></span>
  <?php

}
?>

  <?php

print $picture;
?>

    <?php

print render($title_prefix);
?>
    <h3<?php

print $title_attributes;
?>><?php

print $title;
?></h3>
    <?php

print render($title_suffix);
?>

    <div class="content"<?php

print $content_attributes;
?>>
      <?php

hide($content['links']);
print render($content);
?>
      <?php

if ($signature) {
    ?>
      <div class="clearfix">
        <div>—</div>
        <?php

    print $signature;
    ?>
      </div>
      <?php

}
?>
    </div>
  </div>

  <?php

print render($content['links']);
?>
</div>

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.