[英]symfony2 - the assetic assetic:dump command doesn't create stylesheets correctly
由於某種原因,我無法加載css文件。 這是我使用的包的結構
BD
WebsiteBundle
public
css
以下是我嘗試加載css文件的方法
{% stylesheets 'bundles/bdwebsite/css/*' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
我做了assetic:dump
我做錯了什么?
您在stylesheets
標記中引用了bundles/bdwebsite/css/*
。
這樣資產可以查找web/bundles/bdwebsite/css
(當前不存在的文件夾)中的所有css文件,而不是src/BD/WebsiteBundle/public/css
。
為了在執行assetic:dump
之前將文件放在正確的位置assetic:dump
...
...使用app/console assets:install web
,將它們復制到web文件夾...
...或我的推薦app/console assets:install web --symlink
for symlinks。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.