Module Theming

Hey guys! I have a question regarding modules and theming. I’ve searched all around the web for a solution and I found that modules doesn’t support theming for their own

I am using yiiboilerplate folder structure https://github.com/clevertech/yiiboilerplate and i have 2 sites that are sharing the same modules through the common folder

My problem is that … i can’t use the default module views for the both websites and I just needed something like theming to tell yii in which folder to look for the views.

Is there a way to override a method inside the module init or module beforecontrolleraction to specify the view folder location based on a variable sent from the config ?

Thanks a lot !

CWebModule class has ‘viewPath’ attribute which you could configure per-application in your config file:




'modules'=>arry(

   ...

   'mymodule'=>array(

      'viewPath'=>'other view path than default',

   ),

   ...

)



http://www.yiiframework.com/doc/api/1.1/CWebModule#viewPath-detail

Thanks a lot ! You saved my life :)