Content last modified Tuesday 24 August 2021
hop to #bottom
Current version:
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!


Provides the <txp:beginning /> tag allowing automatic excerpt generation from article body based on length attribute

I think there have been a few other plugins that will automatically create an excerpt (in fact one was just posted), but this one is a little different. Instead of including the first few words of the article body, this is based on the number of characters in the first few paragraphs of the article body. So no matter what, there will be at least one whole paragraph for the excerpt. This way we don’t have to worry about stripping html tags because we include both opening and closing < p > tags in the excerpt.

here is the extended help that comes with the plugin:

The only attribute for this plugin is ‘length’. If you do not specify a length then the default of 350 characters will apply. This plugin will display the first paragraphs of the entry until the total number of characters in these paragraphs is above the ‘length’. So the first paragraph that creates a combined (with previous paragraph’s character count) total of more than the number of characters in ‘length’ will be the last paragraph displayed.

Example tag:
<txp:beginning length="500" />

Version 0.5 rc3

This release was updated for use with rc3, but if you are using an earlier build of textpattern, you might want to use an earlier release of this plugin. Such as pfa_beginning 0.4

Article Request Count:
Initially released:
Posted here:
20 Nov 2004

You know you want to visit the Archives.
Published with Textpattern