I'm trying to display the comments on a node at the top of the page. I've edited node.tpl.php in my theme to be:

<article id="article-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>

  <?php print $unpublished; ?>
  <?php print render($content['comments']); ?>
  <?php print render($title_prefix); ?>
  <?php if(!empty($user_picture) || $title || (!empty($submitted) && $display_submitted)): ?>
    <header class="clearfix<?php $user_picture ? print ' with-picture' : ''; ?>">

      <?php print $user_picture; ?>

      <?php if ($title): ?>
        <h1<?php print $title_attributes; ?>>
          <?php if ($page): ?>
            <?php print $title; ?>
          <?php elseif (!$page): ?>
            <a href="<?php print $node_url; ?>" rel="bookmark"><?php print $title; ?></a>
          <?php endif; ?>
      <?php endif; ?>

      <?php if ($display_submitted): ?>
        <div class="submitted">
            //By:   Mike Ghen 
            //Date: 5/21/2012
            //Description: This Modifies the submitted user and date info.
            //             Code from: http://drupal.org/node/1072640
            if ($submitted) { 
                echo "Submitted on " . date( "F j, Y",$node->created);  
      <?php endif; ?>

  <?php endif; ?>
  <?php print render($title_suffix); ?>

  <div<?php print $content_attributes; ?>>
    print render($content);

  <?php if ($links = render($content['links'])): ?>
  <?php endif; ?>


I moved <?php print render($content['comments']); ?> to the top of the page but, it makes the form to fill out a comment appear at the top of the page as well. Is there a way to render the comments at the top and the comment form at the bottom?

2 Answers 2


you attack this line in file :

    // Remove the "Add new comment" link on the teaser page or if the comment
    // form is being displayed on the same page.
    if ($teaser || !empty($content['comments']['comment_form'])) {
    // Only display the wrapper div if there are links.
    $links = render($content['links']);
    if ($links):
    <div class="link-wrapper">
      print $links; 
  <?php endif; ?>

You are editing a node template , in this situation you are not able to change an element itself , but you can go to comments module , there you can find a template file inside which generates the comment output , copy it to your theme folder/templates then modify it there and changes will be applied. An easier solution could gain by using Panels and page manager . it will take you just some mouse clicks.

Not the answer you're looking for? Browse other questions tagged or ask your own question.