Changing theme for CJuiWidget in config?

Is it possible to change the jQuery UI theme?

I’ve tried adding


'widgetFactory' => array(

            'widgets'   => array(

                'CJuiWidget'    => array(

                    'theme'     => 'smoothness',

                    'themeUrl'  => '/css/jui'

                )

            )

        )

in my config but still defaults to base.

You probably already found out that widget factory instructions/“recipe” isn’t inherited by CJuiWidget descendants. I started thinking about an extended CWidgetFactory::createWidget, based on this line




  $parents = array_keys(class_parents($widget, false));



I don’t know if it’s worth the effort (and performance degradation), though.

BTW you may be interested in this post about a possible setup for switching jQuery UI themes together with Yii themes. (It’s a bit complicated, I know, but it seems it has to be using the support that comes with the current framework.)

/Tommy

I came up with a possible solution in this thread.

/Tommy