Can anyone direct me on the appropriate way to print a node hit counter (via the statistics module) inside node.tpl? I'm trying to display a counter of how many times a particular article has been viewed since published. This counter will be displayed inside the article.

Comments

niwsa’s picture

It would be great if someone respond

marty.true’s picture

To display the node counter stats:
<?php print $node->links['statistics_counter']['title']; ?>

If you just want to print the number:
<?php print (int)$node->links['statistics_counter']['title']; ?>