Reputation: 959
I'm currently working on symfony2 and I have a real problem with the "background-image" from my css files.
My problem is : SF2 doesn't load my js & css files when I use this "/bundles/dimiyvm/" method and I don't know why...
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
{% javascripts '/bundles/dimiyvm/js/*' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% stylesheets '/bundles/dimiyvm/css/*' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}" type="text/css" rel="stylesheet" />
{% endstylesheets %}
ls -la /var/www/site.com/main.site.com/Symfony2/src/Dimi/YvmBundle/web/bundles/dimiyvm/css/
drwxrwxrwx 4 dimitri dimitri 4096 déc. 28 16:29 .
drwxrwxrwx 5 dimitri dimitri 4096 déc. 28 12:07 ..
drwxrwxrwx 7 dimitri dimitri 4096 déc. 28 14:53 classic
-rwxrwxrwx 1 dimitri dimitri 344 déc. 28 14:53 classic.css
drwxrwxrwx 2 dimitri dimitri 4096 déc. 28 14:53 goudy
-rwxrwxrwx 1 dimitri dimitri 901 déc. 28 14:53 goudy.css
-rwxrwxrwx 1 dimitri dimitri 1516 déc. 28 14:35 nivo-slider.css
-rwxrwxrwx 1 dimitri dimitri 27294 déc. 28 14:35 prettyPhoto.css
-rwxrwxrwx 1 dimitri dimitri 33207 déc. 28 16:29 style.css
I have maked:
rm -rf ../../../app/cache/* && phpsf assets:install --symlink web && phpsf assetic:dump && rm -rf ../../../app/cache/*
Thanks you very much for your helping ! Best regards,
Upvotes: 0
Views: 115
Reputation: 41934
You should make it relative: bundles/dimiyvm/css/*
There properbly is not bundles
directory in the root of your website, it's in web/bundles
.
Upvotes: 1