Question

I'm creating small blog on Silex, using Twig for rendering views. Now I've got an error:

Unknown tag name "stylesheets" in "index.html" at line 5

Here is my stylesheet tag:

{% stylesheets '../css/main.css' filter='cssrewrite' %}
    <link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}

As I understood, we can not use tag, because it's only Symfony2 approach and this tag related to AsseticBundle. So how I can include stylesheets without it?

Était-ce utile?

La solution

The solution for me was:

{% block stylesheets %}
   <link href="../css/main.css" rel="stylesheet" type="text/css" />
{% endblock %}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top