Portlet error

I am trying to use this My link

I am getting the following error


Yii::import('zii.widgets.CPortlet'); class UserMenu extends CPortlet { public function init() { $this->title=CHtml::encode(Yii::app()->user->name); parent::init(); } protected function renderContent() { $this->render('userMenu'); } }Yii::import('zii.widgets.CPortlet'); class UserMenu extends CPortlet { public function init() { $this->title=CHtml::encode(Yii::app()->user->name); parent::init(); } protected function renderContent() { $this->render('userMenu'); } }

Fatal error: Class 'UserMenu' not found in /home/abc/public_html/framework/web/CWidgetFactory.php on line 148

Any Ideas?

Nobody? Wow. I got the same thing. Somebody must know how to fix it. We’re trying to do the blog tutorial. I just block copied these portlet lessons and this was the result.

Oh well. If I find an answer, I’ll post it here.

adding <?php

at first line before Yii::import(…

like this

<?php

Yii::import(‘zii.widgets.CPortlet’);

class userMenu extends CPortlet

{

public function init()


{


    &#036;this-&gt;title=CHtml::encode(Yii::app()-&gt;user-&gt;name);


    parent::init();


}





protected function renderContent()


{


    &#036;this-&gt;render('userMenu');


}

}

add <? php