Lines Matching refs:templates

6 the application and not those who are creating Twig templates.
13 configuration and extensions, and are used to load templates from the file
17 initialization and use that to load templates. In some cases it's however
21 The simplest way to configure Twig to load templates for your application
27 $loader = new \Twig\Loader\FilesystemLoader('/path/to/templates');
33 that looks up the templates in the ``/path/to/templates/`` folder. Different
35 templates from a database or other resources.
41 the compiled templates to avoid the parsing phase for sub-sequent
43 the evaluated templates. For such a need, you can use any available PHP
93 When set to ``true``, the generated templates have a
99 The charset used by the templates.
104 templates.
108 An absolute path where to store the compiled templates, or
128 default for all templates (default to ``true``).
152 Loaders are responsible for loading templates from a resource such as the file
158 All template loaders can cache the compiled templates on the filesystem for
159 future reuse. It speeds up Twig a lot as templates are only compiled once; and
178 ``\Twig\Loader\FilesystemLoader`` loads templates from the file system. This loader
179 can find templates in folders on the file system and is the preferred way to
184 It can also look for templates in an array of directories::
188 With such a configuration, Twig will first look for templates in
198 The filesystem loader also supports namespaced templates. This allows to group
199 your templates under different namespaces which have their own template paths.
207 Namespaced templates can be accessed via the special
217 $loader = new \Twig\Loader\FilesystemLoader('templates', getcwd().'/..');
238 projects where storing all templates in a single PHP file might make sense.
251 ``\Twig\Loader\ChainLoader`` delegates the loading of templates to other loaders::
384 If set to ``html``, all variables in templates are escaped (using the ``html``
491 the ``if`` tag, and the ``upper`` filter. Moreover, the templates will only be
510 You can sandbox all templates by passing ``true`` as the second argument of
521 The ``profiler`` extension enables a profiler for Twig templates; it should
572 and access of variables in the compiled templates whenever possible.