views:

339

answers:

2

I need to insert the comment form directly to the node template (I use node-type.tpl.php to theme the node-type).

In related issue, if I go to /comment/reply/NID I get the comment form, but it's got only "preview" button, and no submit button. the Preview button does nothing when pressed on.

Thanks for the help!

+2  A: 

Check your node-type comment settings under 'admin/content/node-type/yourNodeType'. Within the (normally collapsed) fieldset for the comment options, you can choose whether to display the comment form on a separate page or on the same page as the node.

As for the missing submit button, you can change the setting for 'comment preview' from mandatory to optional.

As for the preview button doing nothing, this sounds strange and I have no idea what might cause this - pressing it would normally lead to a preview of the entered comment, with the option to finally submit it. If this problem persists, you should open a separate question for that.

Henrik Opel
A: 

Comment form is not in scope in node-type.tpl.php. Technically you could add it there trough variable preprocessing. But that will introduce a whole new set of problems.

So, unfortunately, you will need to do a step back, and theme the comment-form elsewhere.

  • #node
    • #node-content
    • #comment-form
    • #comments

is not possible

  • #node
    • #node-content
  • #comment-wrapper
    • #comment-form
    • #comments

however, is the way to go.

see http://api.drupal.org/api/drupal/modules--comment--comment-wrapper.tpl.php for a starter

berkes