Help - Search - Members - Calendar
Full Version: Comment Exerpts
Movable Type Community Forum > Additional Resources > Tips and Tricks
igeekus
Okay... on my page I have a little blurb "Last five comments" and it works great, however some of my readers like to leave... long ramblings.  Is there a way to just show the first 20 words of the comment body?
girlie
The FirstNWords plugin will allow you to specify a number of words. Otherwise, the built-in MT attribute "trim_to" will give you a certain number of characters.
almuhajabah
I recommend the FirstNWords plugin over the trim_to method. Not only does it look better to cut off at the word rather than the letter but it automatically strips HTML like MTEntryExcerpt does. You can use the remove_html attribute in addition to the trim_to attribute to get the same effect, but using the plugin is easier smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.