Volt multiple inheritance just doesn't work

I have to tell you thant Volt Multiple Inheritance just doesn't work like explained in the documentation. http://docs.phalconphp.com/en/latest/reference/volt.html#template-inheritance

Example :

```html

// index.volt <!DOCTYPE html>

<html>

<head>

... </head>

<body>

{% block content %} // want to retrieve from child layout.volt{% endblock %}

</body>

<div class="footer">

... some code

</div>

</body>

</html>

```

```html // layout.volt {% extends "index.volt" %}

{% block content %}

... some code

// want to retrieve from child view.volt

... some code

{% endblock %}

{% block javascript %}

// want to retrieve from child view.volt

{% endblock %}

```

```html // view.volt

{% extends "layout.volt %}

{% block content %}

... some code

{% endblock %}

{% block javascript %}

... some code

{% endblock %}

```

Could you explain me why it doesn't work ? It is supposed to work regarding to Phalcon doc.



18.5k
  1. You cannot add {% block javascript %} in a child template, because it doesn't existe in the primary parent template (said in other way, you cannot add new content blocks in child templates).
  2. You have to use {{ super() }} when retrieving content from the parent template.
  3. When you extend, you put the content into the child template, not the parent template. I think you should use include for the opossite effect (http://docs.phalconphp.com/es/latest/reference/volt.html#view-integration). The above rules applies the same way for this (except for the second one).