My client asked me to display the known 'login or register to post comments' link, displayed in the bottom of nodes any comments-enabled drupal site, only when the full node is displayed, not in the teaser node-list view.
I am using Phptemplate. Drupal version: 4.6.1. Web server: apache. Browsers: IE/Firefox.
I've tried to modify links.tpl.php, or to override the phptemplate_comment_post_forbidden() function, or to override the phptemplate_links function - but I get into the same problem : how do I tell if this is the full node or the teaser or the main links?
Or is there a better way to solve the issue?
Please advise.
I've also posted it as a feature request for future versions of the comments module - a full solution is not necessarily a theme issue (a flag may be added).
Thanks
Amnon
-
Personal: Bring Dolphin's Simple Joy to your Work - Job - Career
Professional: Small business web hosting strategies, Drupal Hebrew Hosting
Comments
In node.tpl.php
there is a variable called $page that tells you whether or not the node is the only node being shown. Or in other words whether or not it is in a listing view or not.
http://drupal.org/node/11816
Does that help?
--
Anton