Back when php was relatively new (2002 - 2003), our company hired a few php developers to build several ecommerce solutions. They swore up and down at the time that smarty and pear would get the job done faster and better.
Long story short, after implementing the solution rather quickly we spent more money deleting giant gobs of lame templating code and re-writing the rest of code in very lean php than we did on the original project.
Never again will I use any templating engine on top of a scripting language. It's actually a written core requirement for any new project I contract ("no lame templating engines").
Templating junk can also make it more difficult to get lean standards-compliant html that you need for reliable javascript behavior.
Don't use templating to junk up your code. You've been warned.