Difference between #4 and #5 of
CSS, JS and image URL shortcut methods

Revision #5 has been created by rainyjune on Oct 9, 2010, 6:20:19 AM with the memo:

update Chinese version link
« previous (#4) next (#6) »


Title unchanged

CSS, JS and image URL shortcut methods

Category unchanged


Yii version unchanged

Tags unchanged

Content changed

This is much cleaner and shorter then prefixing the URLs manually. Also, if you ever wish to move the directory of some sort of asset, all you need to do is modify the corresponding method in Html.

You may note that in the above example, `Html` does not *have* to extend `CHtml`. Neither do you have to name the class `Html`. It's all personal preference.

### Links
[Chinese version](http://
2 1
Viewed: 32 634 times
Version: 1.1
Category: Tutorials
Tags: URL
Written by: jonah
Last updated by: jonah
Created on: Sep 2, 2009
Last updated: 9 years ago
Update Article


View all history