I'm trying to get Symfony2 to work with jQuery UI. I've gotten the JavaScript portion of it working just fine but I'm having trouble getting the images to work.
One thing I read in the Assetic docs is that the cssrewrite
filter can take the image paths in CSS files and update them so the paths point to the right places. This looked like exactly what I needed, so I enabled cssrewrite
. Here's how cssrewrite
changed my paths:
// original
images/ui-icons_222222_256x240.png
// using cssrewrite
../../../app/Resources/public/css/themes/base/images/ui-icons_222222_256x240.png
The first path is no good. The cssrewrite
path at least points to the correct path in the filesystem, but relative to my webroot, the cssrewrite
path is WAY off. Obviously my app
directory is not public.
How do I get the cssrewrite
filter to change my paths to something that will actually work?
Here's my stylesheet inclusion. (And yes, I know that the way I'm individually including all these CSS files is dumb, but I'm not worried about that right now.)
{% stylesheets
'../app/Resources/public/css/*'
'../app/Resources/public/css/themes/base/jquery.ui.accordion.css'
'../app/Resources/public/css/themes/base/jquery.ui.all.css'
'../app/Resources/public/css/themes/base/jquery.ui.autocomplete.css'
'../app/Resources/public/css/themes/base/jquery.ui.base.css'
'../app/Resources/public/css/themes/base/jquery.ui.button.css'
'../app/Resources/public/css/themes/base/jquery.ui.core.css'
'../app/Resources/public/css/themes/base/jquery.ui.datepicker.css'
'../app/Resources/public/css/themes/base/jquery.ui.dialog.css'
'../app/Resources/public/css/themes/base/jquery.ui.progressbar.css'
'../app/Resources/public/css/themes/base/jquery.ui.resizable.css'
'../app/Resources/public/css/themes/base/jquery.ui.selectable.css'
'../app/Resources/public/css/themes/base/jquery.ui.slider.css'
'../app/Resources/public/css/themes/base/jquery.ui.tabs.css'
'../app/Resources/public/css/themes/base/jquery.ui.theme.css'
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}