2013年1月31日

CakePHP 2.x CookBook 中文版 第六章 视图 之二

摘要: 主题主题可以使你快捷地切换页面的外观。要使用主题,只需在控制器中指定主题名称:1 class ExampleController extends AppController {2 public $theme = 'Example';3 }在 2.1 版更改:2.1 以前的版本需要使用$this->viewClass='Theme'设置主题。 2.1 删除了这一要求,并在正常的View类中支持主题。也可以在动作或者beforeFilter、beforeRender回调中设置或改变主题:1 $this->theme = 'AnotherExamp 阅读全文

posted @ 2013-01-31 10:29 刘兴伟 阅读(1602) 评论(0) 推荐(1) 编辑

导航