see: http://stackoverflow.com/questions/11192568/symfony2-how-to-share-js-libs-and-css-between-bundles
If you want to share common assets among all your bundles, the best choice is to place them in the
app/Resources/public
directory. For example:app/Resources/Public
|-- css
| `-- base.css
|-- js
| `-- jquery.js
Then you can reference them in your layout as follow:
{% block stylesheets %}
{% stylesheets '../app/Resources/public/css/*' %}
{% endstylesheets %}
{% endblock %}
{% block javascripts %}
{% javascripts '../app/Resources/public/js/*' %}
{% endjavascripts %}
{% endblock %}
评论
发表评论