I have the error "A template that extends another one cannot have a body in DFSiteBundle:Accueil:index.html.twig ", but I have no html outside the blocks.
Smallest code that replicate the problem :
This doesn't work:
{% extends "::layout.html.twig" %}
{% stylesheets 'bundles/DFSite/css/*' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{% block content %}
Test
{% endblock %}
This work:
{% extends "::layout.html.twig" %}
{% block content %}
Test
{% endblock %}
With layout.html.twig :
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
{% stylesheets %}{% endstylesheets %}
<title>{% block title %}The title{% endblock %}</title>
</head>
<body>
{% block content %}
{% endblock %}
</body>
And if I add directly this
{% stylesheets 'bundles/DFSite/css/*' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
instead of the empty %stylesheets% in layout.html.twig, it works
I'm confused...