【问题标题】:Symfony 2.3 assets_version not showing with assetic but showing with assetsSymfony 2.3 assets_version 不显示资产但显示资产
【发布时间】:2015-01-22 13:51:51
【问题描述】:

我想为我的 css 和 js 文件使用参数 assets_version。当我使用 {{asset(bla/bla/file.css) }} 时,它与它们配合得很好,但在我使用 Assetic 时却不行。

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

我创建了命令 php app/consoleassetic:dump 但它仍然没有显示...

如果有人可以帮助我。

谢谢

【问题讨论】:

    标签: symfony assetic


    【解决方案1】:

    基本上我的问题是我没有使用函数资产。

    我有那个:

    {% 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 %}

    【讨论】:

      猜你喜欢
      • 2017-11-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-29
      相关资源
      最近更新 更多