I would like to move the "Login or Register to Post Comments" link from above the comments to below the comments, yet above the comment form.

I have the link variable available in the preprocess_node hook and I can unset it there, but when I try to add it as a variable with another name, it's not available in comment-wrapper.tpl.php.

I guess I'm asking what the Drupal way is to pass this variable from the node to comment-wrapper.tpl.php. It's important that we copy the variable value instead of manually creating the links in so we have the same value for the login and register links regardless of whether another module has acted/changed them.

2 Answers 2


The "Login or Register to Post Comments" link is created via:

theme('comment_post_forbidden', array('node' => $node));

so I'd create a variable with that in the appropriate preprocess hook that has $node available.



theme('comment_post_forbidden', array('node' => $node));

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