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

pfa_beginning

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:
2004-07-12
Posted here:
19 Nov 2004
Article modified:
02 Nov 2006

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.

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

You know you want to visit the Archives.

Browse

Categories


Articles

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