Symfony 2.3 assets_version没有显示资产但显示资产

时间:2015-01-22 13:51:51

标签: symfony assetic

我想将参数assets_version用于我的css和js文件。当我使用{{asset(bla / bla / file.css)}}时,它适用于它们,但在使用Assetic时却不适用。

在后面这种情况下,assets_version只是不显示。

我做了commande php app / console assetic:dump但它仍然没有显示......

如果有人可以帮我这个。

谢谢

1 个答案:

答案 0 :(得分:0)

基本上我的问题是我没有使用功能资产。

我有:

{% stylesheets 'bundles/webapp/css/funCommon.css' 'bundles/webapp/css/funMobile.css filter='?yui_css' %} <link rel=stylesheet href='{{ asset_url }}'> {% endstylesheets %}

而不是:

{% stylesheets 'bundles/webapp/css/funCommon.css' 'bundles/webapp/css/funMobile.css filter='?yui_css' %} <link rel=stylesheet href='{{ asset(asset_url) }}'> {% endstylesheets %}