我的 yii 第一个项目中有一个文件。我的项目有这个路径的新主题
first_proj\themes\project\views\layouts\main.php
我想在其中调用一个函数,如下所示
<?php
if($is_project_manager){
?>
<div class="each-pop-el" style="cursor:pointer" ng-click="showAllMemberTask()">show tasks</div>
<?php } ?>
并在 first_proj\protected\controllers\project.php 中具有功能,这是
public function actionIsProjectmanager(){
$project_manager = false;
$crt = new CDbCriteria;
$crt->condition = 'user_id=:uid and role=1';
$crt->params = array('uid'=>Yii::app()->user->id);
$project_manager= projectMember::model()->findAll($crt);
// $model_result = MyModel::model()->test();
$this->render('the url to theme and main.php file', array('is_project_manager' => $project_manager));
}
我怎样才能访问那个 main.php 文件?我必须写什么而不是
the url to theme and main.php file
在我的函数中?