Skip to content

Commit

Permalink
minor #3859 Add filter cssrewrite (DOEO)
Browse files Browse the repository at this point in the history
This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes #3859).

Discussion
----------

Add filter cssrewrite

According to : http://symfony.com/doc/current/cookbook/assetic/asset_management.html#cookbook-assetic-cssrewrite

For keep link to image in CSS

Commits
-------

0210a35 Add filter cssrewrite
  • Loading branch information
weaverryan committed May 28, 2014
2 parents f617ff8 + f9f5b74 commit bffe163
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cookbook/assetic/uglifyjs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,16 @@ helper:

.. code-block:: html+jinja

{% stylesheets '@AcmeFooBundle/Resources/public/css/*' filter='uglifycss' %}
{% stylesheets 'bundles/AcmeFoo/css/*' filter='uglifycss' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
.. code-block:: html+php

<?php foreach ($view['assetic']->stylesheets(
array('@AcmeFooBundle/Resources/public/css/*'),
array('uglifycss')
array('bundles/AcmeFoo/css/*'),
array('uglifycss'),
array('cssrewrite')
) as $url): ?>
<link rel="stylesheet" href="<?php echo $view->escape($url) ?>" />
<?php endforeach; ?>
Expand Down

0 comments on commit bffe163

Please sign in to comment.