Symfony2 Include in html in Twig

Posted by Haritz on Stack Overflow See other posts from Stack Overflow or by Haritz
Published on 2012-03-22T17:25:40Z Indexed on 2012/03/22 17:29 UTC
Read the original article Hit count: 446

Filed under:
|
|

I am developing an application usin Symfony2 and twig for templates. I am using a 3 level structure for templates. Base.html.twig, layout.html.twig and childtemplate.html.twig. The problem is I am trying to include one example.html (common html file) in the next child template by using include but it doesnt work properly. Where can the problem be?

{# src/Anotatzailea/AnotatzaileaBundle/Resources/views/Page/testuaanotatu.html.twig #}
{% extends 'AnotatzaileaAnotatzaileaBundle::layout.html.twig' %}

{% block title %}Testua anotatu{% endblock%}

{% block body %}
    {% include "var/www/Symfony/web/example.html" %}
{% endblock %}

© Stack Overflow or respective owner

Related posts about html

Related posts about symfony-2.0