CE String
ExpressionEngine 2, ExpressionEngine 3
Back to this add-on's main page
View Other Add-ons From Causing Effect
Truncate with parameter exact not working
Support (Resolved)
aelvan
|
Posted: 14 February 2012 12:04 PM |
|
|
|
I’m trying to truncate some text, and I want it truncated exactly to 130 characters, here’s what I got:
{exp:ce_str:ing truncate="130" exact="yes" ending="…" remove_html} text {/exp:ce_str:ing}
But, it still truncates to the previous whole word, like it should when exact=“no”.
Using EE 2.4 and CE String 1.2.
|
|
|
Causing Effect - Aaron Waldon
|
Posted: 14 February 2012 02:55 PM |
# 1
|
|
Developer
|
Hi aelvan!
I think this works fine. I believe you’re getting confused on syntax. With CE String, each method is it’s own parameter, and each argument is pipe delimited.
So instead of:
{exp:ce_str:ing truncate="130" exact="yes" ending="…" remove_html} text {/exp:ce_str:ing}
You would simply write:
{exp:ce_str:ing truncate="130|…|yes" remove_html} text {/exp:ce_str:ing}
Let me know if you have any questions!
|
|
|
Lulu
|
Posted: 19 September 2013 09:17 AM |
# 2
|
|
|
Hi Aaron,
Thanks for this! I was confused too but now I get it :)
|
|
|