I am trying to define an alternative/default template loader path in case the first one is not found.
Currently I initialize mustache this way:
$m = new Mustache_Engine(array(
'loader' => new Mustache_Loader_FilesystemLoader($templates_path,array('extension'=>'.php'))
));
And then I render the template:
$m->render($my_template_path, $fields);
The render method is called several times under the same Mustache instance. This works fine, but I am not sure how to update the loader path without creating a new Mustache instance.
I have been reading the docs, but haven't got it to work. I've tried using $loader->load() instead of render. That allows me to change the path, but it doesn't render the variables.