Component theme


Is it/will it be possible to define theme view files for components?

I read in the forum that for 1.0.x it is not possible because there were some concerns about performance if every widget would look for a theme file…

Does the theme feature in Yii support for components/views

The answer in that post was basically to use skins, but what if I don’t have a widget but a portlet instead?


Isn’t a portlet considered a widgets?

True, CPortlet extends CWidget!

My bad…:)


After having played around with the skins I came to the conclusion that in my case they aren’t as useful as the theming option would be…

I have an installation of Yii that will have multiple sites implemented, and some of the components view files need to be totally different (layout and content) on the different sites, e.g. a shopping cart…

Since skins are themeable and therefore also use performance, that was said to be the concern, why not also just make the components themeable?

My quick fix for this will probably be to check in the component controller if a theme is being used and then render a different view file if needed. But it would be nice to have all the view files associated with a theme in the themes folder.

So if anyone has a nice solution for this please reply…

Thanks, :)