G
G
gachkydxvbgd2017-04-25 08:31:01
symfony
gachkydxvbgd, 2017-04-25 08:31:01

How to output css twig symfony?

<link href="{{ asset('@AdminBundle/resources/public/css/vendor.min.css') }}" rel="stylesheet" />

I also tried assetic.
{% stylesheets '@AdminBundle/Resources/public/css/*' %}
    <link rel="stylesheet" href="{{ asset_url }}" />
      {% endstylesheets %}

36db8b180cd3480eade508ab35b29959.png
It seems to be loading, but the template does not see css
192169296a954c3ba85195551468fb61.png
And the page load speed has decreased by 10 timesa75cc12f74d84d909bd7d5e435b9c40e.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
1alexandr, 2017-04-25
@gachkydxvbgd

<link href="{{ asset('bundles/admin/css/vendor.min.css') }}" rel="stylesheet" />

More or less like this. Check if your statics are in web/bundles. If not, do assets:install web --symlink.
If there is a need to build a frontend, then it is better to do it using webpack, gulp etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question