I'm trying to customize the comment reply link to direct the user to the comment submission form on the same page. I've tried:

$content['links']['#links']['comment-reply']['href'] = '#edit-comment-body-und-0-value';

in my comment.tpl.php, but no luck. Also I need to add a JavaScript onclick to make the comment body in focus and add the user name of the user being replied to.

What should I do?

1 Answer 1


Have a look at the code of the AJAX comments module. It does simmilar things. There's a good chance that you can learn from theire code.

  • 1
    Thanks, I just ended up using the ajax comments module, its exactly what I needed.
    – oobie11
    Jan 27, 2012 at 23:03

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