symfony - Symfony2 - Images In CSS with Assetic -
Edit: I think a third party bundle has been found, in which there is a bit of configuration, which I see appears to be completed: currently it The only disadvantage is that there is no type of cash busting, however, saying that the functionality was as simple as forking / patching and the composer had to add the necessary dependencies. I still welcome any official / recommended methods of completing this, but now it works very well that I 'm comfortable in using it in production. I am recently diving into Simfoni 2 and giving myself to make the project more familiar with the structure. Here's my setup: Inside a low file: I have run the However, I'm kicking in my OCD and I am trying to find a way to get all images referenced in the CSS file so that Before I'm going and want to come up with some obscene way to accomplish it, any simple method is an easy way to get referenced pictures within the CSS files, with property Also handled: Dump? I still welcome any official / recommended methods of completing this, but now it works very well that I am comfortable to use it in production.
& lt ;! - base.html.twig - & gt; & Lt; Top & gt; & Lt; Title & gt; Page & lt; / Title & gt; {% Block stylesheets%} {% stylesheets bundle / website / less / *. Low output = 'asset / css / output.css' filter = 'lessphp, cssrewrite'%} & lt; Link rel = "stylesheet" href = "{{Asset_url}}" & gt; {% Stylesheet%} {% endblock%} & lt; / Head & gt;
/ * main.less * / body {background: url ('../ images / bg.jpg') ; }
php app / console assets: install the web - symlinks and
php app / console additive: dump which Uses the Cssrewrite filter, generates CSS file and sets the path of the image to
'../../ bundles / website / images / bg.jpg' It works fine
web / web / Before placing a deployment before.
Comments
Post a Comment