Theme and Skin

Hi all,

I have some problems understanding theme and skin.

I want to use a CJuiDatePicker with a different look, but I cannot understand how to do it.

  1. I have downloaded a theme (lets call it "orange")from JUI, inside there is a css file and a folder with images. Where should I put this files? In css folder? In images folder? Should I create another folder and call it jui?

  2. If I want to change the look of the widget should I use skin or theme? I’m currently not using any theme.

  3. Basically what I want is not to use the default theme ("base") that is used by the widget.

Here is my code:


$this->widget('zii.widgets.jui.CJuiDatePicker', array(

    							'model'=>$model,			

								'attribute'=>'ev_dateStart',

    							'options'=>array(

        							'showAnim'=>'fold',

									'dateFormat'=>'dd/mm/yy',

									'minDate'=>'date()'

    							)

					));

Any help is appreciated.

Thanks

the code from the yiiplayground example should help you out i think: ziiDatePicker

Thank you kams, exactly what I needed, I think also I understand how to use the skin feature.

If anyone is interested, I created a directory under assets "assets/jui/orange" with the files from the jui theme (css and images)then:

on the view


<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(

    							'model'=>$model,			

								'attribute'=>'ev_dateStart',

								'skin'=>'orange',

    							'options'=>array(

        							'showAnim'=>'fold',

									'dateFormat'=>'dd/mm/yy',

									'minDate'=>'date()'

    							)

					)); ?>

in protected/views/skins/CJuiDatePicker.php




<?php

return array(

    'orange'=>array(

       'themeUrl'=>Yii::app()->assetManager->baseUrl.'/jui',

		'theme'=>'orange'

    ),

);



Everything seems to work fine, and I don’t have to setup every time the themeUrl or theme, the skin is enough.

Thanks

hello,

in yii 1.1.3 you can also set widget default parameters from the configuration file; so keep an eye on the yii playground project cause it will soon be update to take advantage of this new useful feature!

also keep in mind that yii playground is open to everyone who’d like to join and extend it ;)

Giovanni.

Not very usefull this link