How to develop website side bar plugins


I am developing some CMS in Yii 1.1… frontend and backend are two separate web apps.

Frontend must have some side bar plugins such as weather, currency rate info, active users statistics etc. To achieve this I wrote a class which extends CWidget… and the file resides in /protected/components. Then this class is called in view files as same as CGridView like a widget.

Now in backend, site admin must be able to configure those plugins. For ex: Weather plugin shall be configured to show temperature in F or C, which cities to show on frontend.

What is the best way to develop those plugins? Should they be as widgets, extension or modules?

Please share your know-hows.


I wouldn’t develop them as modules. I like to think of modules as child applications, and small widgets don’t really fit that mould. I would personally develop them as widgets, and if you really wanted to separate them out, you could develop them as part of an extension package (i.e. create a ‘configurable widgets’ extension, and group them all under that).

Hi Artificial, thanks for suggestion…