Plugins
All this little plugin does is cutting X characters from the beginning and / or the end of a given text and returns the trimmed string.
Tag:
{exp:trimmer}{/exp:trimmer}
Parameters:
left="X”
cuts X characters from the beginning of a text
right="X”
cuts X characters from the end of a text
Example:
{exp:trimmer left="3" right="4"}
<p>Some text to trim.</p>
{/exp:trimmer}
returns:
Some text to trim.

Download: pi.trimmer.zip
1.33 KB
If you found something useful here and want to show your appreciation feel free to
or
Comments:
1 of 1 pages
FIXED—thanks!
Posted by on 08/27 at 12:30 PM
There was a glitch in version 1.0.1 that was most likely the cause. If you download the latest version it should work.
Posted by on 08/27 at 10:14 AM
I tried to implement this on 1.6.0 in the following weblog entries tag and it didn’t produce any results:
{n_location}, {entry_date format="%F %d, %Y"} — {exp:trimmer left="3"}{n_body}{/exp:trimmer}
Basically, I have the location and the body in two different fields becasue this is a press release. However, I want the location and body to be on the same line, however the p tag is causing me problems so I thought this would be the perfect extension.
Posted by on 08/26 at 10:13 PM
It takes any text-string between its tags and cuts off the number of chars specified.
The string in the example is “<p>Some text to trim.</p>” so it will actually remove “<p>” in the beginning and “</p>” at the end.
Posted by on 08/21 at 10:37 AM
Don’t you mean it would return this?:
e text to t
Or am I completely misunderstanding this plugin?
Posted by on 08/16 at 02:52 PM
1 of 1 pages