php - How to configure cssrewrite in symfony when using relative path in css in symfony 2? -



php - How to configure cssrewrite in symfony when using relative path in css in symfony 2? -

i've tried ways this, still unlucky, when view source of css generates url('../../../bundles/images/bg.jpg')

in config.yml changed use_controller -> true same in config_dev.yml code \resources\views\layout.html.twig:

{% extends "::base.html.twig" %} {% block stylesheets %} {% stylesheets 'bundles/globeuser/css/bootstrap.min.css' 'bundles/globeuser/css/styles.css' filter="cssrewrite" output="css/compiled/styles.css" %} <link rel="stylesheet" src="{{ asset_url }}" media="screen" /> {% endstylesheets %} {% endblock %}

and used less compile css code was:

body{ background: url('../../images/bg.jpg'); }

in resources/public/css/styles.css

i tried commands like:

- php app/console assets:install web --symlink - php app/console assets:install - php app/console assetic:dump - php app/console assetic:dump --watch - php app/console cache:clear - php app/console assetic:watch

php css symfony2 twig yaml

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -