From: fabien Date: Mon, 28 Dec 2009 20:55:27 +0000 (+0000) Subject: added a not about using several directories for the filesystem loader X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=62184184c632e163ed60046a4b3d32fa5d5e4f13;p=konrad%2Ftwig.git added a not about using several directories for the filesystem loader git-svn-id: http://svn.twig-project.org/trunk@207 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- diff --git a/doc/03-Twig-for-Developers.markdown b/doc/03-Twig-for-Developers.markdown index c6742d8..b5c43d8 100644 --- a/doc/03-Twig-for-Developers.markdown +++ b/doc/03-Twig-for-Developers.markdown @@ -135,6 +135,15 @@ Here a list of the built-in loaders Twig provides: [php] $loader = new Twig_Loader_Filesystem($templateDir); + It can also look for templates in an array of directories: + + [php] + $loader = new Twig_Loader_Filesystem(array($templateDir1, $templateDir2)); + + With such a configuration, Twig will first look for templates in + `$templateDir1` and if they do not exist, it will fallback to look for them + in the `$templateDir2`. + * `Twig_Loader_String`: Loads templates from a string. It's a dummy loader as you pass it the source code directly.