Posted By

micmath on 10/30/07


Versions (?)

Short preview in Smarty is...

 / Published in: Smarty

Short preview in Smarty is generated from longer text like this.

  1. {$article|strip_tags|substr:0:25}{if strlen($article) > 25}...{/if}

Report this snippet  


RSS Icon Subscribe to comments
Posted By: mbandion on January 28, 2008

I would recommend: truncate

Posted By: micmath on March 11, 2008

That would be {$article|strip_tags|truncate:25}

You need to login to post a comment.