This is a simple extension to pick themes. The themes scanned from your theme directory, and the user get the choice to pick one via dropbox, simple and effective... you can add some css to style things, this is CPortlet User choice (theme choice) stored in cookie.
You are more than welcome to improve it and share
Requirements ¶
Yii framework ;-)
Usage ¶
Copy the ThemePicker directory to your extensions directory
When you extend CController... Put inside CController::init() method :
Yii::import('ext.ThemePicker.EThemePicker');
EThemePicker::setTheme();
*as an alternative you can put it in beforeAction, this will also work...
In your view put
<?php
$this->widget('ext.ThemePicker.EThemePicker', array(
));
?>
make it work
Hi,
where is "CController::init() method" ?
solved
Found it:
/protected/components/Controller.php
public function init() { Yii::import('ext.ThemePicker.EThemePicker'); EThemePicker::setTheme(); }
Can you integrate with bootstrap?
If you're using yii-boostrap, and it's in preload, its css are pre-published in assets.
How to use theme css for this ?
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.