Glen Swinfield’s Website v2.0

“I work for Erskine Design in Nottingham. Which is nice. You've got choices, you can visit my homepage, take a look at the available downloads or view the blog archives. Please contact me whenever you like. Also, why not subscribe to the RSS feed.”

Truncate Text Nicely in EE

Truncate long passages of text without breaking words in ExpressionEngine.

The text truncator has been updated and moved to here

--- You can ignore from this line down, it's not relevant anymore and is here for archive purposes only ---

Basically this plugin...

I built this because I wanted to use it for some small text areas and couldn't find anything else that did what I wanted. It may or may not be of use to you. Feel free to recommend changes/improvements.

Example Use

{exp:gms_truncator finish="<a href='/path/{url_title}'>...</a>" wrap_html="div" max="150"}</strong><br /><br />
Lorem Ipsum is simply dummy text of the printing and typesetting industryLorem Ipsum has been the industrys standard dummy text ever since the 1500swhen an unknown printer took a galley of type and scrambled it to make a type specimen bookIt has survived not only five centuriesbut also the leap into electronic typesettingremaining essentially unchangedIt was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
<
br /><br /><strong>{/exp:gms_truncator}</strong>

Would produce the following html:

<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since <a href="/path/the_url_title">...</a></div>

Name:

Email:

URL:

Remember my personal information

Notify me of follow-up comments?

Recent Posts