yii widgets CMenu

  1. in your \protected\views\layouts\main.php

  2. below code use in main.php

  1. \protected\components\widgets\(suppose create folder name is MainMenu) then your path is

  2. \protected\components\widgets\MainMenu

  3. in your MainMenu folder create file (homemenuWidget.php)

  4. \protected\components\widgets\MainMenu\homemenuWidget.php (below code use in this file)

  1. create new folder view in MainMenu folder then create new file (homemenu.php) in view folder so your path is

  2. \protected\components\widgets\MainMenu\views\homemenu.php

What you are trying to explain here :o

this is useful for new user(new yii developer). that current development start in yiiframework. to easily create widgets CMenu. :rolleyes:

Hi deepeshsaini,

Thank you for your contribution to the community. :)

I would like to recommend you just a few things, though …

  1. "Tips, Snippents and Tutorials" sub section of the forum should be much more suitable for this kind of posts.

http://www.yiiframework.com/forum/index.php/forum/12-tips-snippets-and-tutorials/

  1. Please use code markup signs to make it more easy to read.

I mean, please use "<>" button.

  1. Adding links to the guide or the references would be very nice.

:D