Rohitashv Singhal
Rohitashv Singhal

Reputation: 4557

Unable to embed templates in Symfony2

I want to add some content in Symfony 2. I do it as follow:

{% embed "sub.html.twig" %}
{% block sourcecode %}
    <div class="tab-pane" id="5" name="textsource">
        <textarea id="source" class="span6"></textarea>
    </div>
{% endblock %}
{% endembed %}

When I run this then it is showing that it is unable to find sub.html.twig. What should I do?? And in sub.html.twig I am using the following code:

{% embed 'AcmeTaskBundle:Default:index.html.twig' with {} %}

Upvotes: 0

Views: 585

Answers (1)

umpirsky
umpirsky

Reputation: 10024

Please try to change

{% embed "sub.html.twig" %}

to

{% embed "AcmeTaskBundle:Default:sub.html.twig" %}

Upvotes: 2

Related Questions