Вот модуль контроллера модуля:
Код: Выделить всё
class HeadController extends Controller
{
public function actionIndex()
{
return $this->renderFile('@frontend/modules/header/views/head/index.php');
}
}
Код: Выделить всё
<?php echo Yii::$app->getModule('header')->runAction('head/index');?>
И еще такой момент, метод render в контроллере почему-то не корректно работает, если записать его вот так:
Код: Выделить всё
return $this->render('index')