symfony/symfony — Issue #3415: Twig block inside a block
Author: drfrow
Created: 2012-02-22 20:32:44+00:00
State: open

Maybe this is done on purpose and its not an issue, but I am getting weird results when I have a {% block content %} and then place another block inside of it like {% block meta_title %}test title{% endblock %} it will show the "test title" text in the position inside the content block instead of in the layout file meta title. So if you are not allowed to do a block inside a block then I thought I had a work around figured out with a little {% endblock %}{% block meta_title %}test title{% endblock %}{% block content %}{{ parent() }} but that does work cause its not inside the same twig template, its a included Render call and since the endblock is not on the same template twig throws a validation error for that work around. If this is designed to work like this I am sorry for reporting it as an issue, just didn't seem right not me.