How To Config Preload Components In Controller

I use YCM as my administration component.

我用YCM做为我的后台管理组件

I’ve preloaded bootstrap in my application.config.main.php ,bootstrap.responsiveCss=false.

我在application.config.main.php里面配置了bootstrap的responsiveCss为false,而且把bootstrap加入了preload队列

but in YCM,the backend of my site,i need to set bootstrap’s responsiveCss=true

但是在YCM里,也就是我的网站后台,我需要设置bootstrap的responsiveCss为true

these are my code in application.modules.ycm.YcmModule.php ,but it doesn’t work.

下面是我在application.modules.ycm.YcmModule.php中的代码,但是好像没起作用。

if i change responsiveCss=true in application.config.main.php,it works.

如果我在application.config.main.php里面设置responsiveCss为true倒是有效果。

but,i don’t need to use responsiveCss in frontend.

但是我不想在前端使用responsiveCss。




public function init(){

Yii::app()->setComponents(array(

    'bootstrap'=>array(

        'responsiveCss'=>true,

    ),

);

}



I don’t know why.but i think if we can’t re-config a preload component?

我不知道为什么,但我在想是不是不能重新配置一个preload的组件?

help me,please.

帮帮我,谢谢啦。

Thanks everyone for reply :P.

谢谢所有回复的朋友 ;p

Hi Season,

hope these URLS might help you

http://www.yiiframework.com/doc/api/1.1/CApplication

http://www.yiiframework.com/doc/guide/1.1/en/extension.use