Hi,
-
I created the class (MainSideMenu.php) extended from CPortlet. The class file is in the /protected/component folder.
-
After that I created the view file (categoryMenu.php) under the /protected/component/views folder.
-
I used this portlet in the widget which is in the column2.php.
After I put the widget in the column2.php, I got the following error.
Please help me.
In MainSideMenu,
Yii::import('zii.widgets.CPortlet');
class MainSideMenu extends CPortlet {
public function init() {
$this->title = CHtml::label('<span class="sidemenutitle">Category</span>', 'pcategory');
parent::init();
}
protected function renderContent() {
$this->render('categoryMenu');
}
}
In categoryMenu.php
<ul>
<li><?php echo CHtml::link('Tee',array('post/create')); ?></li>
<li><?php echo CHtml::link('Blouse',array('post/admin')); ?></li>
<li><?php echo CHtml::link('Short Pant',array('comment/index'))
. ' (' . Comment::model()->pendingCommentCount . ')'; ?></li>
<li><?php echo CHtml::link('Others',array('site/logout')); ?></li>
</ul>
In Column2.php,
$this->widget('MainSideMenu');