You can take two approaches: You can theme the view (as suggested by asghar) or you can theme the node-comment.tpl.php file. In Drupal 6 we also provide .tpl.php files for node-comment.tpl.php and nodecomment-wrapper.tpl.php. Just copy them to your theme's directory, clear the Drupal caches, and change as necessary.
to theme the comment wrapper, you would use comment-wrapper.tpl.php, this works as expected
ive tried to copy node-comment.tpl.php to my theme folder and it doesnt take, i did drush cc all, if i modify the file directly in the nodecomment/ folder, then it works, but this shouldnt be the solution ive tried renaming it to node-content-type-user-as-comment.tpl.php and didnt work either, or node-comment-content-type or even comment .tpl.php
any ideas why?
ive tried to remove nodecomment/node-comment.tpl.php and then i just get a default node styling for node comments and my theme's tpls arent parsed
my theme is a subtheme of typebased
edit: the content types used are custom, not the comment content type created by the module, yet nodecomment/node-comment.tpl.php is parsed.. how does this work exactly
well it seems i needed to copy node.tpl.php as well from my base theme, after that all the logic works, i used a template name to override a specific content type only
Note that in order to override the template for a specific node type, the theme must also implement the base node.tpl.php file. If this file is omitted, the theme will not detect the presence of node-[type].tpl.php files.
Comments
Comment #1
asghar commentedHi
Can we theme node comments ? Have you find any solution?
Comment #2
tommytom commentedlooking also for the answer ...
Comment #3
asghar commentedtommytom
hello we solve this problem by view 2
Comment #4
quicksketchYou can take two approaches: You can theme the view (as suggested by asghar) or you can theme the node-comment.tpl.php file. In Drupal 6 we also provide .tpl.php files for node-comment.tpl.php and nodecomment-wrapper.tpl.php. Just copy them to your theme's directory, clear the Drupal caches, and change as necessary.
Comment #5
quicksketchMoving to fixed, please reopen if you have further questions on this subject.
Comment #7
abaddon commentedto theme the comment wrapper, you would use comment-wrapper.tpl.php, this works as expected
ive tried to copy node-comment.tpl.php to my theme folder and it doesnt take, i did drush cc all, if i modify the file directly in the nodecomment/ folder, then it works, but this shouldnt be the solution
ive tried renaming it to node-content-type-user-as-comment.tpl.php and didnt work either, or node-comment-content-type or even comment .tpl.phpany ideas why?
ive tried to remove nodecomment/node-comment.tpl.php and then i just get a default node styling for node comments and my theme's tpls arent parsed
my theme is a subtheme of typebasededit: the content types used are custom, not the comment content type created by the module, yet nodecomment/node-comment.tpl.php is parsed.. how does this work exactlywell it seems i needed to copy node.tpl.php as well from my base theme, after that all the logic works, i used a template name to override a specific content type only
quoting from http://drupal.org/node/190815
Comment #8
abaddon commentedComment #10
Jb33 commentedBased on this thread I could not get things working my Zen subtheme. I tried to modify these files without success:
subtheme/node-comment.tpl.php
subtheme/templates/node-comment.tpl.php
subtheme/node-mycommenttype.tpl.php
subtheme/templates/node-mycommenttype.tpl.php
Theme registry was cleared between attempts. Can you help me with this?
Comment #14
Miguel Pereira commentedDid you take in consideration what abaddon indicated on #7? a node.tplp.php file must be present for a node-comment.tpl.php to work.
Comment #15
abaddon commented