[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"
代码
Have fun with Yii!
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!
相关文章推荐
- How to slove the problem of Garbage Characters of Chinese and Errors of Images in Qt
- OpenCV_Tutorials——CORE MODULE.THE CORE FUNCTIONALITY—— How to scan images, lookup tables and time measurement with OpenCV
- LM_Sensors on Cent OS 5.4 How To Get And Install The Coretemp Module
- How to distinguish a human and a robot in the future?
- How to install Android SDK and play with Android 2.0 in the emulator
- 32-bit Assembler is Easy, why and how to develop using the assembler; start learning to program in Assembly now!
- [eZ publish] When a ezxml embed an video, how to get the ezxml object in the video embed template?
- How To Turn Up Logging on the Siebel Web Server Extension in Siebel Versions 7.x and 8.x? [ID 477185
- How to Copy and Paste in the Ubuntu Gnome Terminal
- How to separate the implementation and definition for template function in c++
- How to copy and paste quickly in the shell
- How to Pop Open an image window that resizes to fit the image in ASP.net 1.x and 2.0 Beta 1
- [Yii Framework] How to develop an extension with image, css and js
- How to use the System Restore API to save and to restore system data in Visual C++
- How to Access and Use the Windows Hosts File in Windows 7 and Vista
- How to invoke the method of managed bean and render view in JSF when we are outside the lifecycle of JSF
- use noscript html tag when user disable the javascript in browser, guide user how to enable the js in different browser and retu
- how to avoid css and js cache in UIWebView
- How to Install Nvidia Kernel Module Cuda and Pyrit in Kali Linux
- How to collect TrustZone debug logs and check the meaning of error code in the logs