I'd like to replace default template of symfony1.4 with Mustache. To my surprise, I cannot find related approach by Google search.
Then, I suppose I can do it in simple way.
public function executeIndex(sfWebRequest $request)
{
include('/path/to/Mustache.php');
$m = new Mustache();
echo $m->render('Hello {{planet}}', array('planet' => 'World!'));
return sfView::NONE;
}
This looks clumsy. The main problems are:
Where to store the mustache template('Hello {{planet}}' in my case)?
Is it possible to replace default View Handler? so that I can put mustache template in templates folder and be transparent to action?
Thanks