后台控制器只有管理员登录后才能访问,要渲染的视图在后台模板目录(`public/themes/`)里,要继承`cmf\controller\AdminBaseController` 如: ```php <?php namespace app\admin\controller; use cmf\controller\AdminBaseController; class IndexController extends AdminBaseController { public function index() { return $this->fetch(); } } ``` 上面`IndexController`要渲染的模板文件是`themes/后台当前主题目录/admin/index/index.html` 如果后台控制器不要登录也可以访问,可以通过重写初始化方法: ```php <?php namespace app\admin\controller; use cmf\controller\AdminBaseController; class PublicController extends AdminBaseController { public function _initialize() { } public function login() { return $this->fetch(':login'); } } ```