hi!
I’m working on a Yii Website, which sould work out of the box without any installed Theme as default, but it should be possible to add new Themes later.
So my question is what is the best way to use css files.
i have see one solution for css file is to use a accessible css folder like this:
a ) without themes
WebRoot/
assets
protected
css
latter adding this code to layout or view file:
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/mycss.css" />
b ) with themes
when i try to adopt the folder structure from this article i have a structure like this:
WebRoot/
assets
protected
css
themes/
basic/
views
css
fancy/
views
css
latter adding this code to layout or view file of a theme:
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->getTheme()->getBaseUrl(); ?>/css/mycss.css" />
have i understand it correct? or is there any better way to handle this?