从另一个控制器 yii 渲染视图
问题描述:
控制器:
controllers
|-FooController.php
|-BarController.php
意见:
view
|-foo|
| |-index.php
| |-error.php
|
|-bar|
|-index.php
如何通过条形控制器的动作渲染error.php 视图?我试过了:
How to render the error.php view with an action of the bar controller? I have tried:
$this->render('foo/error');
但它不起作用.
答
试试这个
$this->render('//foo/error');