schmittjoh/JMSTwigJsBundle — Issue #1: Including Templates - name mistmatch
Author: weaverryan
Created: 2011-12-09 01:01:49+00:00
State: open

Hey Johannes!

Not really an issue probably, more of question. How should I be including other templates?

In order for the assetic twig_js filter to compile, I need to use the Symfony2 template format:

{% include 'AcmeDemoBundle:Default:foo.html.twig' %}

But to actually include it in assetic, I'm using the file-path format:

"@AcmeDemoBundle/Resources/views/Default/foo.html.twig"

On the frontend, my template is assigned to the variable `foo.html`. However, the rendered `include` looks like this:

`new AcmeDemoBundle.Default.foo.html(...`

In other words, the name of the template is mis-matched. So, am I doing something wrong In either including the template or how I include the template?

Thanks!