您的位置:首页 > 编程语言 > PHP开发

[Yii Framework] How to embed the css and images in a module

2010-09-22 12:58 537 查看
Maybe there is not a good introduction about how to embed css and images in a module in the forum (or cookbook) of Yii framework, but thanks to Qiang, who builds the great framework, that I found the way in the kernal code in framework/gii (In fact that gii is a module!)

Here is the structure of my module "admin"

代码

//calling the css
<?php echo Yii::app()->controller->module->registerCss('main.css');?>

//calling the images
<?php echo CHtml::image(Yii::app()->controller->module->registerImage('logo.png'), "logo");?>


Have fun with Yii!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐