Hi All,
I’m starting design new themes layout from scratch (start learning Yii of course ). Most of Yii function have already its own CSS (style.css) while generating content and it included in somewhere e.g assets folder ( gridview, detailview).
In order to have result that fit to my themes, I create a new CSS file in CSS folder, design a new themes.
But now the problem is, how to make my CSS (I created one, stylesheet.css) into the last order in rendering in view?.
Here the example:
In development view:
[indent]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
</title><link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/insoul/stylesheet.css" />
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/css/insoul/js/cufon-yui.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/css/insoul/js/arial.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/css/insoul/js/cuf_run.js"></script>
<title><?php echo CHtml::encode($this->pageTitle); ?>
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
</head>
[/indent]
But after I view a table page (contains: CRUD function), I got additional CSS is loaded:
[indent]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
</title><link rel="stylesheet" type="text/css" href="/testyi/css/insoul/stylesheet.css" />
<script type="text/javascript" src="/testyi/css/insoul/js/cufon-yui.js"></script>
<script type="text/javascript" src="/testyi/css/insoul/js/arial.js"></script>
<script type="text/javascript" src="/testyi/css/insoul/js/cuf_run.js"></script>
<link rel="stylesheet" type="text/css" href="/testyi/assets/884ba3ad/gridview/styles.css" />
<link rel="stylesheet" type="text/css" href="/testyi/assets/760cf9c0/pager.css" />
<script type="text/javascript" src="/testyi/assets/14db184d/jquery.js"></script>
<script type="text/javascript" src="/testyi/assets/14db184d/jquery.ba-bbq.js"></script>
<title>Testing Yii Development - Admin Employees
</head>
[/indent]
If I want to play with my CSS, I should load it at the last order,
[indent]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
</title>
<script type="text/javascript" src="/testyi/css/insoul/js/cufon-yui.js"></script>
<script type="text/javascript" src="/testyi/css/insoul/js/arial.js"></script>
<script type="text/javascript" src="/testyi/css/insoul/js/cuf_run.js"></script>
<link rel="stylesheet" type="text/css" href="/testyi/assets/884ba3ad/gridview/styles.css" />
<link rel="stylesheet" type="text/css" href="/testyi/assets/760cf9c0/pager.css" />
<script type="text/javascript" src="/testyi/assets/14db184d/jquery.js"></script>
<script type="text/javascript" src="/testyi/assets/14db184d/jquery.ba-bbq.js"></script>
<link rel="stylesheet" type="text/css" href="/testyi/css/insoul/stylesheet.css" />
<title>Testing Yii Development - Admin Employees
</head>
[/indent]
How can I achieve that?
Any help is really I appreciated.
Regards,
dondi.