Help - Search - Members - Calendar
Full Version: first 20 words
Movable Type Community Forum > Additional Resources > Tips and Tricks
Jim-Jim
i want my category page to display the first 20 words of the entry ...

say i have a category called blah and it has 10 entries ... i want the first 20 words and only those words to be displayed sort of like a little taste of whats there ... would someone please show me how to do this ... thx in advance for the help
Jim-Jim
a good example of what i'm trying to do can be found here
kadyellebee
Well, MTEntryExcerpt will do what you are looking for, as long as your Weblog Config has the "Number of words in excerpt:" set to 20. smile.gif

Otherwise, the trim_to global attribute can be used on any of the tags.

Kristine
maddy
This should do it too:
CODE
<MTEntryBody words="20">
smile.gif
kadyellebee
Thanks Maddy smile.gif I should know better than to try and help when I'm distracted when another project wink.gif I don't come up with the smart option first biggrin.gif
Jim-Jim
fanx for the help ... can you tell me how i might add a "..." to the end of the 20 words
maddy
CODE
<MTEntryBody words="20">...
smile.gif
colburn
And, if you're a typesetting refugee like me you may use the entity for an ellipsis (that's what those 3 dots are called):

&hellip;



It will space the dots out properly rather than scrunching them together the way just typing 3 periods does.

Sorry about that, sometimes can't help myself.
Jim-Jim
thx folks
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.