Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
0.2
About It:
Get it:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

kgr_safe_excerpt

Generates an excerpt based on the body text with tags removed, or the excerpt, if it exists.

It’s designed to operate like Movable Type’s handling of excerpts, in that it will return the excerpt for an article if it exists, otherwise it will only return the first 20 words (but the number of words is configurable).

You can configure the number of words with the “words”? parameter to the tag:
<txp:kgr_safe_excerpt words="50" linktext="Continue reading..." />

I’ll add an option to turn the permalink off entirely in the next version.

Article Request Count:
Initially released:
2004-07-11
Posted here:
08 Apr 2005
Article modified:
12 Aug 2007

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (9)

Mark:
Would love to try this plugin out, except the referenced URL only contains:

Not much help!
? the referenced URL contains the plugin.
joe:
what is the syntax to use within the article tag in order to use the plugin? I can’t get it to actually work.

here is how i have it set up
< code>
< txp:article />
< txp:if_individual_article>
< txp:kgr_safe_excerpt words="50" linktext="More>>” />
< p>
< txp:link_to_prev>< /txp:link_to_prev>
< txp:link_to_next>< txp:next_title />< /txp:link_to_next>
< /p>
< /txp:if_individual_article>
< txp:if_article_list>
< p>
< txp:older>Previous
< txp:newer>Next
< /p>
< /txp:if_article_list>
< /code>

thanks!
joe,

The example above looks fine—it should work. I’m not sure why it wouldn’t work. Maybe the plugin broke under 4.0? I’m not actually using the plugin anymore on my own site, so I’m not sure if it still works under the latest Textpattern versions. If I get a chance I’ll check it out later.

-Kurt
Works a treat for me. TXP 4.0.1.

Thanks :¬)
Since I can’t seem to figure out how to edit the information above, be advised that the URL for this plugin has changed:

http://www.raschke.net/~kurt/s/software/textpattern/plugins/kgr_safe_excerpt.txt

-Kurt
Hynek Zatloukal:
Thanks!
alex:

Ooops – can someone paste a url for this plugin??

Pleeeeeese

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

Would you care to write a comment or visit the forum discussion?

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern