Not a developer? Go to

Plugin and Theme Directory

SmartTrim v2.0

By François Nonnenmacher
Posted December 23, 2009, in Developer.


SmartTrim is a plugin for Movable Type 4 that aims to provide a smarter trimming global modifier than words or trim_to.

The stock MT global modifier words cuts at a certain number of words without any control on the resulting length, it will also remove all HTML tags. trim_to cuts to a specific length but can cut a string in the middle of a word and can also output invalid HTML in the form of unclosed tags.

SmartTrim: - trims a string to a target character length without cutting words - will close any unclosed tags if the source contains HTML - can append an optional ending string like an ellipsis to the result


Install tidyp and html-tidy (or HTML::Tidy from CPAN)


Movable Type versions: 4.3



gagnerargent on January 12, 2010, 11:34 a.m. Reply

Needed this badly. Thanks.

Meilleur site poker on June 7, 2010, 8:58 a.m. Reply


Avocat on June 27, 2010, 4:35 a.m. Reply

Really Thanks, Francois

Mihai Bocsaru on November 2, 2010, 11:49 a.m. Reply

Another excellent movable type plugin François!

For handling the words modifier formatting I’m using the “Better Word Limit” plugin, but yours is excellent for trimming purposes.

Thanks a lot!

hiếu lê

hiếu lê on August 24, 2018, 6:31 p.m. Reply


Tyagi Ji

Tyagi Ji on October 4, 2018, 12:15 p.m. Reply

Hey, Here we are going to share one of the best portal how to fix connections for bluetooth audio devices and wireless displays in windows 10 mobile which will make your work all easier by providing you exact ways for the same purpose.


dibiya on December 3, 2018, 2:23 p.m. Reply

Recently I have seen the post and I came to know about the SmartTrim v2.0 Plugin. I have gone through your post but I did not get any informative contents from your post. It seems to be null. Try to add some more uses and benefits of the plugin. What are the features of the SmartTrim v2.0 Plugin? Update your post. tours in paris


james on December 11, 2018, 7:03 p.m. Reply

This article has suggested to me many new ideas. I will embark on doing it. Hope you can continue to contribute your talents in this area. Thank you. Consumer Financing


untaine on January 9, 2019, 1:41 p.m. Reply


untaine on January 9, 2019, 1:47 p.m. Reply


mayanksharma on January 28, 2019, 10:34 p.m. Reply

Thanks for updating us. By the way, Apply for a personal loan online, and avail various entitlements like lowest interest rates, minimum tenure, lowest EMI, and quick approvals, with doorstep facility for documents, and quick disbursals. Hassle free application process.


asad664 on May 8, 2019, 4:05 p.m. Reply

The 2019 Cricket World Cup (officially ICC Cricket World Cup 2019) is the 12th edition of the Cricket World Cup, scheduled to be hosted by England and Wales,from 30 May to 14 July world cup live stream channels


ArchieLardner on June 12, 2019, 12:51 p.m. Reply

I have heard the term Tera Gold a lot of times but i am little bit confused from its actual meaning. I guess that it’s some of the forms of the Gold and the block wall contractor tucson service is such an amazing place where we can write our own articles. I like to do more research about the Tera Gold so clear my doubts about it.

Leave a Comment

François Nonnenmacher

Founder of Ubiquitic, a web consultancy based in Noumea, New Caledonia. François has more than 10 years of experience with Movable Type (from the time it was just Mena and Benjamin Trott in a garage!) and has implemented it in small and big business sites, such as the blogs of the Capgemini Group, as well as the blogs of Le Figaro, the first online news site in France.

Twitter: @François Nonnenmacher