Hello
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?
Cheers
Page 1 of 1
Component theme
#2
Posted 29 April 2010 - 07:40 AM
Isn't a portlet considered a widgets?
php:
foreach(array('cat', 'dog', 'cow') as $animal) echo $animal."\n";
python:
[(animal, print(animal)) for animal in ['cat', 'dog', 'cow']]
ruby:
['cat', 'dog', 'cow'].each {|animal| puts animal}
You say Tomato, I say Tomato.
#4
Posted 30 April 2010 - 01:55 AM
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,
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,
Share this topic:
Page 1 of 1

Help













