Hi -
If there is a story or forum topic with comments, I would like to display an ad at the bottom of the comments (not the bottom of each comment, otherwise I could use comment.tpl.php, but rather at the bottom of the list of comments).
I could put something on the bottom of page.tpl.php, but then it would show up on all pages, but i just want it to show up when you are viewing a node with comments (and of course i can put it in node.tpl.php but then it shows above, not below, the comments).
It seems like the right place is page.tpl.php, but i'd have to query "are we on a node that has comments," for which I'd have to get a handle on $node, which I have been unable to do.
This isn't terribly pressing, but it's a typical example of how I wish I better understood how data is passed around in phptemplate. If anyone could point me in the right direction I'd really appreciate it...
Thanks and happy holidays to everyone.
Rich
Comments
variables in comment.tpl.php
Hi,
I have exactly the same question, so I wonder if you were able to find any answers?
I thought it could go in comment.tpl.php if there is a variable that tells me what number comment this is, or if this is the last comment.
Or I could put it in page.tpl.php if I could find a way to check if there were any comments displayed on this page.
But as with you I'm still working out what information is available when those php files are run.
Fingers crossed, MrB