Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I was trying to display a link if a node was comment-able but the status variable $node->comment was returning NULL when used in my node.tpl.php, it seems to be fine if the node is loaded using node_load(), then the $node->comment = 2 or 1 or 0 according to my the comment display setting for the node (2 for read/write) but when the node is rendered it goes back to NULL. This is confirmed by comparing the output of the 'dev load' and 'dev render' tabs of the devel module; 2 in load and NULL in render.
Comments