Category Archives: CSS

Symfony2: assetic, rewriting image paths in CSS

Twig template: {% block stylesheets %} {{ parent() }} {% stylesheets filter=’cssrewrite’ output=’css/*.css’ ‘bundles/testcompanytestbundle/css/*’ %} <link href=”{{ asset_url }}” type=”text/css” rel=”stylesheet” /> {% endstylesheets %} {% endblock %} Console commands: php app/console assets:install web/ php app/console –env=prod assetic:dump CSS example … Continue reading

Posted in assets, CSS, rewrite, Symfony2 | Leave a comment