Help - Search - Members - Calendar
Full Version: Trimming The Text...
Movable Type Community Forum > Using Movable Type > Categories and Entry Tags
rjrasmussen
Hello all,
On the main index, I'm looking to trim posts to approx 25 words. In MT's tag documentation, under Entries, the attribute for words or trim_to are listed very obscurely on the page. However, this doesn't tell me where in my code I need to put them to work. If I'm looking for 25 or so words, is words the best choice? Or is trim_to? What's the difference?
Also, given the following code, where should I put it to make it work?
Thanks in advance for any/all help! biggrin.gif

CODE
<MTEntries>
<$MTEntryTrackbackData$>
</MTEntries>
<MTEntries lastn="3" category="Organizational Effectiveness"><div id="entry-<$MTEntryID$>">
<a href="<$MTEntryPermalink$>" class="style3"><strong>
<$MTEntryTitle$>
</strong></a><br />
By
<$MTEntryAuthorLink show_email="0"$ class="maintext">
on
<span class="maintext">
<$MTEntryDate format="%x %X"$>
|</span> <span class="maintext"><a href="<$MTEntryPermalink$>" class="maintext">Permalink</a> |
<a href="<$MTEntryPermalink$>#comments" class="maintext">Comments (
<$MTEntryCommentCount$>
)</a> |
<a href="<$MTEntryPermalink$>#trackback" class="maintext">TrackBacks (
<$MTEntryTrackbackCount$>
)</a></span>
<p>
<$MTEntryBody$>
<div class="entry-tags">
<strong>Tags:</strong>
<MTEntryTags glue=",">
<a href="<$MTTagSearchLink$>&amp;IncludeBlogs=<$MTBlogID$>" rel="tag">
<$MTTagName$>
</a> </MTEntryTags>

</div>
<p>Continue reading <a href="<$MTEntryPermalink$>#more">
<$MTEntryTitle$>
</a></p>
</div>
<p><br />
</p>
</MTEntries>
caribou sue
QUOTE (rjrasmussen @ May 29 2008, 05:07 AM) *
Hello all,
On the main index, I'm looking to trim posts to approx 25 words. In MT's tag documentation, under Entries, the attribute for words or trim_to are listed very obscurely on the page. However, this doesn't tell me where in my code I need to put them to work. If I'm looking for 25 or so words, is words the best choice? Or is trim_to? What's the difference?
Also, given the following code, where should I put it to make it work?
Thanks in advance for any/all help! biggrin.gif


Hi,
You can do this like so:

<MTEntryBody words="25">


rjrasmussen
Needless to say, that makes sense, but given the code I've listed, where precisely would I put it? ...or how would I manipulate that code?
caribou sue
QUOTE (rjrasmussen @ May 29 2008, 05:40 AM) *
Needless to say, that makes sense, but given the code I've listed, where precisely would I put it? ...or how would I manipulate that code?


You would just replace your <$MTEntryBody$> tag with this one. It's about 21 lines down in your example code.
rjrasmussen
it's so simple...why is it that I couldn't do that myself???

much appreciated. 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.