小编Vin*_*ven的帖子

"base.html.twig"中的symfony2("没有"cssrewrite"filter.")

小问题.我正在学习symfony2框架,我得到了这个错误

在编译"base.html.twig"中的模板("没有"cssrewrite"filter.")时抛出异常.

我是否必须在某处手动激活它或者在安装过程中出错(在Windows上运行它).有人能指出我正确的方向吗?

枝条:

{% block stylesheets %}
            {% stylesheets filter='cssrewrite'
        '%kernel.root_dir%/../vendor/twbs/bootstrap/dist/css/bootstrap.css'
        '%kernel.root_dir%/../vendor/twbs/bootstrap/dist/css/bootstrap-theme.css'
        '@blogBundle/Resources/public/css/costom.css'
            %}
            <link rel="stylesheet" href="{{ asset_url }}"/>
            {% endstylesheets%}
        {% endblock %}
    framework:
        secret: xxxxxxxxxx
        router:        { resource: "%kernel.root_dir%/config/routing.yml" }
        templating:    { engines: ['twig', 'php'] }
Run Code Online (Sandbox Code Playgroud)

config.yml文件

imports:
    - { resource: parameters.yml }
    - { resource: security.yml }
    - { resource: services.yml }
    - { resource: "@blogBundle/Resources/config/services.yml" }

# Put parameters here that don't need to change on each machine where the app is deployed
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration …
Run Code Online (Sandbox Code Playgroud)

php symfony

1
推荐指数
1
解决办法
1991
查看次数

标签 统计

php ×1

symfony ×1