Answer the question
In order to leave comments, you need to log in
Symfony 2 - Where to put and how to include css/js?
Welcome all.
Decided to master Symfony2. Help with including resources in twig template engine.
Tried placing css in app/Resorces/public/css
{% stylesheets "/Resources/public/css/*" %}
<link type="text/css" rel="stylesheet" media="all" href="{{ asset_url }}" />
{% endstylesheets %}
Answer the question
In order to leave comments, you need to log in
BEST PRACTICE
Store your assets in the web/ directory.
symfony.com/doc/download-best-practices-book
And so your paths are not correct, use relative ones (relative to the template file).
You can play around with the asset, but it's better to immediately look towards bower/grunt/gulp
The guy painted and tested more than enough stackoverflow.com/questions/9500573/path-of-assets...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question