I have question about theming. How can I set different css files for different themes? I can't find any information how to do this.
Page 1 of 1
Css and Theming
#2
Posted 11 February 2010 - 08:49 AM
micz, on 11 February 2010 - 05:34 AM, said:
I have question about theming. How can I set different css files for different themes? I can't find any information how to do this.
You can put ur css dir/files under the theme folder eg: /themes/themeName/css/style.css and access it using
Yii::app()->theme->baseUrl.'/css/style.css'
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.
#3
Posted 11 February 2010 - 09:40 AM
I thought that themes folder is not accessible by users
. Because default views are in protected folder.
Thx for your help.
Thx for your help.
#4
Posted 11 February 2010 - 11:42 AM
micz, on 11 February 2010 - 09:40 AM, said:
I thought that themes folder is not accessible by users
. Because default views are in protected folder.
Thx for your help.
Thx for your help.
You can publish these css files with AssetManager or create a subdirectory in webroot/css directory with a theme name and access your css this way: Yii::app()->baseUrl.'/css/'.Yii::app()->theme->name.'/style.css'
Share this topic:
Page 1 of 1

Help












