I was looking for a solution to reduce some text to just an exact amount of characters from the left side of the text. Character Limiter is great but it did not cut words. I needed it to cut the text after the exact defined number of characters, regardless if it potentially cuts up a word.
I haven’t found a solution for this so I created my own plugin, which I would like to share with everybody that sees a use for this in their own project/s.
Plugin Name: ExactCut Version 1.0.1 Author Bert Austin Author URL http://www.PixelGrinch.com Description Limit some text to an exact defined number of characters Compatible EE 1.6.x
Usage
Reduces the string to exactly the defined amount of characters from the left side of the string.
{exp:exactcut}{/exp:exactcut}
left=”X” Reduces the text to only the left X number of characters.
{exp:exactcut left="5"} PixelHeist.com {/exp:exactcut}
returns:
Pixel
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.