-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
For example; when you have a "A\MyBundle" namespace and a "B\MyBundle". The B version is only loaded in certain situation and is a child bundle of "A\MyBundle". In this bundle there is a controller and a view etc.
The view's filename is "index.html.twig" and you want to override some blocks in the B version.
You can not create the same file and extend the A one. Like:
{# A\MyByndle:Dir:index.html.twig #}
{% block something %}
... default markup goes here ...
{% endblock %}
{# B\MyBundle:Dir:index.html.twig #}
{% extends 'A\MyBundle:Dir:index.html.twig' %}
{% block something %}
... something different ...
{% endblock %}
This will throw a "reached nested level" error. Read something about missing the scope in the template loader. There are also some fixes out there, but this should be fixed and covered by default I guess?!
For now I made override the controller and action too, and use another filename for the "index" view but this should be possible in terms of overriding bundles.
Metadata
Metadata
Assignees
Labels
No labels