Question

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!

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top