By kevinf7 on
I have added the heading "Comment" above my comments via comment-wrapper.tpl.php
However , how do I go about adding the number of comments to the heading such as :-
"3 Comments"
or
"1 Comments" ?
I am not the strongest developer so any help will be much appreciated .. thanks !
Comments
<?php print
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Thats easy, thanks !
Thats easy, thanks !
welcome ;-) === "Give a man
welcome ;-)
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Else if no comments/ with comments
Could you make this into an if else statement in even there are no comments? I want it to show nothing if there are not comments and then the counter if there is one :D
How about individual numbers
Looking to put...
#1 by the first comment in a node then
#2 by the second... etc...
Try something like that in
Try something like that in comment.tpl.php:
<h3>#<?php print $id; ?></h3>HTML markup is only an example. Take a look at:
http://api.drupal.org/api/file/modules/node/node.tpl.php/6
Hope this helps.
great code :-)
This code is great, but does not work with the module usernode_guestbook, can you improve it?