Browse Source

Overrides the default {% include %} token parser since it loads through the right template renderer

henrikbjorn 14 years ago
parent
commit
30cf086828
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/Symfony/Bundle/TwigBundle/Extension/HelpersExtension.php

+ 3 - 0
src/Symfony/Bundle/TwigBundle/Extension/HelpersExtension.php

@@ -63,6 +63,9 @@ class HelpersExtension extends \Twig_Extension
 
             // {% flash 'notice' %}
             new HelperTokenParser('flash', '<name>', 'templating.helper.session', 'getFlash'),
+
+            // {% include 'sometemplate.php' with ['something' : 'something2'] %}
+            new HelperTokenParser('include', '<name> [with <arguments:array>]', 'templating.engine', 'render'),
         );
     }