Hi
I can't get work below example:
https://docs.phalcon.io/en/latest/reference/volt.html#multiple-inheritance
I have three files.
1) views/index.volt with below content:
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
{% block stylesheet %}{% endblock %}
</head>
<body>
{% block content %}{% endblock %}
{% block javascript %}{% endblock %}
</body>
</html>
2) views/layouts/index.volt with below content:
{% extends 'index.volt' %}
{% block stylesheet %}
<link rel="stylesheet" href="style-layout-index.css" type="text/css" />
{% endblock %}
{% block javascript %}
<script>alert('hello from layout');</script>
{% endblock %}
{% block content %}
<h1>Main content of view/layouts/index.volt</h1>
{% endblock %}
3) views/index/index.volt content is:
{% extends 'layouts/index.volt' %}
{% block stylesheet %}
<link rel="stylesheet" href="style-view-index.css" type="text/css" />
{% endblock %}
{% block javascript %}
<script>alert('hello from view');</script>
{% endblock %}
{% block content %}
<h1>Main content of view/index/index.volt...</h1>
{% endblock %}
HTML generated it's:
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
</head>
<body>
</body>
</html>
I notice that there is not {{ content() }} called anywhere on that example, and when I try add it then code generated it's a bit messed.
Any suggestion?
I would like to have a master views/index.volt template with different blocks, which can be extended by single layouts, and each view file should be also able extend blocks of master and layout template.
Thanks!!