codeguy/Slim-Extras — pull request #43 by richleland (2012-10-11 00:00:04+00:00)
Title: Twig view tweaks

While working on a project using Slim + Twig, I've run into a use case where I want to use Twig's ability to traverse multiple template directories to load and render a template.

This pull request adds a public static property called ``$twigTemplateDirs`` to the ``\Slim\Extras\Views\Twig.php`` file that allows a user to set an array of directories for Twig to use. If this array is empty, it falls back to the current behavior of using the parent class' ``getTemplatesDirectory()`` method.

I also added documentation for all the available public static properties on the Twig view class.

If there's a smarter way to do this in Slim or just an option/feature I'm missing in Slim itself let me know. Thanks!