Musings
ExpressionEngine entry excerpts outside of the search page
11th November 2009
If you need to use an excerpt for an entry perhaps inside an entry loop with several weblogs this plugin will automatically select the correct excerpt field then format and truncate it to a specified length.
I’ve just moved the code to GitHub, you can download it there and raise any issues you might have.
It works by using the search excerpt setting in Admin › Section Administration › Section Management › Edit Section Preferences › Administrative Preferences see the screenshot:
All you do is pass it an entry id and optionally a word limit and trailing string:
{exp:linssen_excerpt entry_id="{entry_id}" word_limit="10" trailer="... read more"}
Would result in “Quod littera Investigationes ii parum nunc. Amet suscipit hendrerit wisi… read more“
It’s probably best to use it inside an entry loop, but you can happily send it a standalone entry id and it will work just fine, here’s the full code I recommend it with:
{exp:weblog:entries weblog="weblog"}
{exp:linssen_excerpt entry_id="{entry_id}" word_limit="10" trailer="... read more"}
{/exp:weblog:entries}
I’d appreciate some feedback, just in case it’s buggy etc. so let me know!
Discuss
Get involved in the discussion by using the comment form below.

bayi
17th June 2010
Nice software to use. I like expression engine