title: Smarter word wrap with Smarty?
body: <p>I'm trying to find a way to wrap a long headline after a specific number of words, based on the total character count of the headline.  My purpose is to make the bottom line of the wrapped text longer than the top line to increase readability.</p>
  
  <p>I'd like to use Smarty to find the character count of the headline, then decide how long to make the first line based on the default font size and the width of the containing element. But I'm not a coder and don't know the best way to make arrays, foreach loops, iteration counts, and other stuff that's probably necessary to pull this off. </p>
  
  <p>I'm basically trying to:</p>
  
  <ol>
  <li><p>Find the total character count of the headline using <code>{$item.name|count_characters:true}</code></p></li>
  <li><p>If the total character count is between 60 and 100 characters, add a br tag at the end of the first word that ends past 30 characters.</p></li>
  </ol>