"feature request" for the Definitive Guide - Yii::app()->request->baseUrl

Hi, if there’s a better place to post this request, please let me know.

I would like there to be a paragraph discussing the use of Yii::app()->request->baseUrl on the page for URL Management in the Definitive Guide.

I thought I could save some time during prototyping and just put my css and js files in the directories by that name rather than go through the whole exercise of asset management. Unfortunately, I ended up losing a lot of time trying to figure out the proper way to refer to those directories with registerCssFile and registerScriptFile, because it took a long time for me to think about looking in protected/views/layouts/main.php to see how it was done there.


post your question ?

I’m afraid your problem does not have anything to do with url management.

Url management is about creating urls to other pages and different url formats, not about creating urls to assets like css, js or image files.