I have stylesheet block in base layout:
{% stylesheets
filter='cssrewrite'
'bundles/static/css/main.css'
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
I am wonder if I can extend this block in sub template. Add another CSS link or links.
Could somebody give me any advice? Is this even possible?
Of course, it’s possible.
But currently, you don’t have stylesheet block. You use the stylesheets tag.
Just add a block like this:
And in others templates:
Don’t forget to call the
parentfunction to not override parent stylesheets.