它给我这个错误
无法解析请求 " Customerlifecycle / Customerlifecycleanalytic"
这是我的代码:
Costomerlifecycle Controller
Yii::app()->clientScript->scriptMap = array('jquery.js' => false, 'jquery-ui.min.js' => false, 'jquery-ui.css' => false);
class Customerlifecycle extends Controller {
public $layout = '//layouts/column2';
public function actionCustomerlifecycleanalytic() {
}
}
的index.php
<li class="">
<a class="subpageaccess" href="<?php echo CHtml::normalizeUrl(array('Customerlifecycle/Customerlifecycleanalytic')); ?>">
Customer Life Cycle Analytics</a>
</li>
答案 0 :(得分:1)
尝试使用第一个字符小写。 因为控制器的名称和url中的操作的名称是小写的。这是yii惯例..
<li class="">
<a class="subpageaccess" href="<?php echo
CHtml::normalizeUrl(array('customerlifecycle/customerlifecycleanalytic')); ?>">
Customer Life Cycle Analytics</a>
</li>