Fatal Errors in zii.widgets.menus.CListMenu

A Ticket has been raised for this; I’ve put it here to give others the solution.

When using CListMenu you get:

YiiBase::include(CBaseMenu.php) [<a href=‘yiibase.include’>yiibase.include</a>]:failed to open stream: No such file or directory

Fix is to add the line:


Yii::import('zii.widgets.menus.CBaseMenu');

before the CListMenu class declaration

Having solved that the next issue is:

Fatal error: Call to protected method CHtml::renderattributes() from context ‘CListMenu’ in C:\…\zii\widgets\menus\CListMenu.php on line 53

Fix is to change the line in renderMenu() from


echo '<ul'.CHtml::renderAttributes($htmlOptions).'>';

to


echo Chtml::openTag('ul', $htmlOptions);

The zii menu is still not fully implemented…

May I know what is the state of development of this menu widget? I tried to find it out myself but was unable to find zii in Yii SVN on google code. I’d like to know if I have to develop my own menu system for this purpose (I believe it would be just a copy of the one which will be in Yii) or can I wait a bit until its functional…

The menu widget is ready in SVN (http://code.google.com/p/zii/).

We will soon release 1.1.0 which contains this widget.