php - shortcut to add stylesheets to symfony2/twig
192
A a result of this question, I now use this code to add a stylesheet within a twig file:
{% block stylesheets %}
{{ parent() }}
{% stylesheets filter="sass"
"test/newstyle.scss"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{% endblock %}
because this code is very unhandy, just to add one more style, I wonder if there is a more shorthand solution? Something like:
{% adStylesheet(test/newstyle.scss) %}