We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Problem with TruncHTML

Development and Programming

Ian Ebden's avatar
Ian Ebden
312 posts
about 18 years ago
Ian Ebden's avatar Ian Ebden

Just started using this, looks like it could be really useful. Having some issues with is so far though. Here’s my syntax (inside a weblog tag):

{exp:trunchtml chars="185" ending="..."}{summary}{/exp:trunchtml}

However, my summary is being truncated well short of the specified 185 characters. Any thoughts?

Thanks

       
Andy_vdG's avatar
Andy_vdG
62 posts
17 years ago
Andy_vdG's avatar Andy_vdG

Make sure you are using the most recent version of trunchtml (version 1.1 or above) and then use the option: exact=”yes”. From the manual: Otherwise text will be cut after a space to prevent cutting words in the middle. If you have a long word that takes you over the 185 chars it will remove the entire word leaving you with less than 185 chars.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.