I missed the possibility to truncate the Article Excerpt, to a given number of words. So I made myself a simple little Plug-in, to add this missing Feature.

Textpattern Tag

<txp:fly_excerpt />

Attributes

The Plug-in Tag accepts 4 Parameters:

  • truncate - How many words should be truncated - Default: 10
  • more - String to show User there is more content. Default: ...
  • link - Show "more" String as HTML Link. Values 0(no) or 1(yes). Default: 0
  • class - Optional HTML Class Name for "more" String Link

This Plug-in is released under the MIT License. A Repository can be found on github - github.com/brachycera/fly_excerpt

Changelog

Version 1.02 (27. Sept. 2016)

  • Added register for fly_excerpt Tag `->register('fly_excerpt')` for compatibility to Textpattern Ver. 4.6.0

Version 1.01 (6. Feb. 2015)

  • Bugfix for Excerpt with HTML Code

Version 1.0 (6. Feb. 2015)

  • Initial Release
  • Renamed Plugin to follow TXP plugin guidelines
  • Added new Attributes more, link and class

Version 0.1beta (31. Oct 2010)

  • Private Release