Yii 1.1: themepicker

Simple solution to picking theme
14 followers

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(
)); 
 ?>

Total 3 comments

#11657 report it
realtebo at 2013/01/25 07:02am
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 ?

#5388 report it
Bibi40k at 2011/10/08 11:00pm
solved

Found it: /protected/components/Controller.php

public function init()
{
    Yii::import('ext.ThemePicker.EThemePicker');
    EThemePicker::setTheme();
}
#5369 report it
Bibi40k at 2011/10/07 07:16am
make it work

Hi, where is "CController::init() method" ?

Leave a comment

Please to leave your comment.

Create extension