Permalink
Browse files

feature #4556 Updated twig reference with optimizations and paths (jz…

…awadzki)

This PR was merged into the 2.3 branch.

Discussion
----------

Updated twig reference with optimizations and paths

Added information about `optimizations` and `paths` twig configs to reference

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | >=2.3
| Fixed tickets | -

Commits
-------

f89eb39 Updated twig reference with optimizations and paths
  • Loading branch information...
weaverryan committed Feb 24, 2015
2 parents 1726054 + f89eb39 commit d447b12d6eeb44db0befa8d30ebd2ba67a1880e9
Showing with 17 additions and 8 deletions.
  1. +17 −8 reference/configuration/twig.rst
@@ -44,6 +44,8 @@ TwigBundle Configuration ("twig")
strict_variables: ~
auto_reload: ~
optimizations: ~
paths:
"%kernel.root_dir%/../vendor/acme/foo-bar/templates": foo_bar
.. code-block:: xml
@@ -53,12 +55,14 @@ TwigBundle Configuration ("twig")
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/twig/twig-1.0.xsd">
<twig:config auto-reload="%kernel.debug%" autoescape="true" base-template-class="Twig_Template" cache="%kernel.cache_dir%/twig" charset="%kernel.charset%" debug="%kernel.debug%" strict-variables="false">
<twig:config auto-reload="%kernel.debug%" autoescape="true" base-template-class="Twig_Template" cache="%kernel.cache_dir%/twig" charset="%kernel.charset%" debug="%kernel.debug%" strict-variables="false" optimizations="true">
<twig:form>
<twig:resource>MyBundle::form.html.twig</twig:resource>
</twig:form>
<twig:global key="foo" id="bar" type="service" />
<twig:global key="pi">3.14</twig:global>
<twig:exception-controller>AcmeFooBundle:Exception:showException</twig:exception-controller>
<twig:path namespace="foo_bar">%kernel.root_dir%/../vendor/acme/foo-bar/templates</twig:path>
</twig:config>
</container>
@@ -74,13 +78,18 @@ TwigBundle Configuration ("twig")
'foo' => '@bar',
'pi' => 3.14,
),
'auto_reload' => '%kernel.debug%',
'autoescape' => true,
'base_template_class' => 'Twig_Template',
'cache' => '%kernel.cache_dir%/twig',
'charset' => '%kernel.charset%',
'debug' => '%kernel.debug%',
'strict_variables' => false,
'auto_reload' => '%kernel.debug%',
'autoescape' => true,
'base_template_class' => 'Twig_Template',
'cache' => '%kernel.cache_dir%/twig',
'charset' => '%kernel.charset%',
'debug' => '%kernel.debug%',
'strict_variables' => false,
'exception_controller' => 'AcmeFooBundle:Exception:showException',
'optimizations' => true,
'paths' => array(
'%kernel.root_dir%/../vendor/acme/foo-bar/templates' => 'foo_bar',
),
));
Configuration

0 comments on commit d447b12

Please sign in to comment.