We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

compiled template not shown

Hi everyone, I'm desperatly trying to get an inherited view template running...

{# index.volt #}
<!DOCTYPE html>
<html>
<head>
    <title>Title</title>
</head>
<body>
{% block content %}
    hello layout content<br>
{% endblock %}
{% block content2 %}
    hello layout content2<br>
{% endblock %}
</body>
</html>

{# test/index.volt #}
{% extends "index.volt" %}

{% block content %}
    hallo test/index content<br>
{% endblock %}

{% block content2 %}
hello test/index content2 <br>
{% endblock %}

when I call the action in the browser, the default contents from the layout are shown. The action is definitely executed, the cached template is produced with the correct contents. so ... whats wrong? i don't get it. :(

Best, Thomas



633
Accepted
answer

solved. for some strange reason i don't understand, it works if you rename the main template to something different from "index.volt" ... :(