$sf_response->addStyleSheet() dosen't work in SF 1.4?

前端 未结 3 758
时光取名叫无心
时光取名叫无心 2021-01-23 12:03

Does anyone know how to add stylesheets in a template with Symfony 1.4 ?

I have tried everything I can think of, from modifying frontend/config/view.yml to modifying the

3条回答
  •  太阳男子
    2021-01-23 12:27

    http://www.symfony-project.org/tutorial/1_4/en/upgrade#removal_of_the_common_filter

    As of 1.4 your javascripts and stylesheets are no longer automatically injected into your head tag. Instead, you need to include the following in your layout where you'd like them to be placed:

    
    
    

    and just in case your post title wasn't a typo you'll want to use addStylesheet('...') off of the response:

    $sf_response->addStylesheet('main');
    

提交回复
热议问题