I am starting to use smfony and I have some doubts, I have the following base template:
base.html.twig
<!DOCTYPE html>
<html>
<head>
{% block head %}
<meta charset="UTF-8">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet">
<title>{% block title %}Icebird{% endblock %}</title>
{% block stylesheets %}{% endblock %}
{% endblock %}
</head>
<body>
{% block header %}Esto es un Header{% endblock %}
{% block nav %}Aqui hay una barra de navegación{% endblock %}
{% block body %}{% endblock %}
{% block footer %}Aqui hay un footer{% endblock %}
{% block javascripts %}{% endblock %}
</body>
</html>
I would like to have the code inside the block of header, nav and footer in another file since it is quite extensive and I would like to have it sorted, I am trying to create a file header.html.twig
and there to put the code, then do a extends in base and include the labels of the header ( {% block header %}{% endblock %}
) in base but I get an error, some idea of how to do it?