widget effects


i want to add a javascript effect to a widget (like the userlogin widget from blog demo).

it will be link initially when a click happens it will transform to full view widget.

im looking through docs but i couldnt see anything related so far. is there anything in

the framework for this kind of stuff? or do i have to hardcode it in the views

We have done something similar. Our "Rollup" widget has a button to show/hide the content of the widget, so saving screen space.

Our solution was to register the script file in the init() method of our widget; keeps it out of the way and everything else nice and clean.

// Portlet extends CWidget

class Rollup extends Portlet {

  public function init() {

    $this->cssClass .= ' rollup';




Hope that helps.


thank you chris

it solved the problem. but im still thinking a class for basic widget effects.

since component class has event and behavior support.