Rendering A Module View In Main.php

i want to create dynamic menu in a module and then render a module view into main.php file in layout. so how should I do that??

Make an extension extending CWidget(or CMenu).

Something like this http://www.yiiframework.com/extension/cssmenu/

What means dynamic menu? If it’s based on RBAC just use checkaccess() to make it dynamic but still it will be in main layout.

I really dont understand what you trying to invent.