I'm trying to include my header into another template, not extending, like this
{% include '@Foo:Bar:_header.html.twig' %}
That header, contains this
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>{{ site.name }}</title>
{% block stylesheets %}
{% stylesheets
"@Foo/Resources/public/app.css"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{% endblock stylesheets %}
</head>
<body>
Nothing unusual, just some css file with assetic.
This behaviour gives throws me this exception
An exception has been thrown during the compilation of a template ("The template does not support the "bundle" parameter.") in "@Foo/bar/_header.html.twig".
huh?
If instead of including it {% include %}
I extend it {% extends %}
everything works perfectly.
Why I want to include instead of extend? I want to create new blocks, and include other stuff etc.
This problem is ok? Is this the way it's supossed to work?
#bundles: [ ]
this is what I have, I've always used it like this. If this were the problem, it wouldn't work even with{%extends%}
but it is working that way, and the error would be something likeAdd this bundle to your assetic config
(or something like that, I don't remember exactly) – En