Home ›
Display the word count of a piece of contentDisplay the word count of a piece of content
Submitted by Benjamin Melançon on July 11, 2010 - 3:02pm
In the most useful comment on a thread of useful comments, Greg Harvey describes how to get the word count for a node in the template level: access just the body portion of the content variable for a node in and count the words in template.php, then output this variable in node.tpl.php.
There is also a module for displaying word counts of recent posts (not, it seems, on the node itself when viewing it): http://drupal.org/project/wordcount
Searched words:
node wordcount
drupal word count
Comments
Post new comment