Load Native Extjs 4 In Yii


I’m quite new to Yii. My website frontend i’m going to build with the yii framework, and for my backend i wanted to use the native ExtJS 4 framework (no, not the extension ExtJS4Yii or how it’s called).

Extjs4 uses a kind of autoloader to load its needed js files. I can specifiy the base path, but what after it follows is always the same. Examples (remove the http before the links because newbie rules):

  • demo.localhost/extjs/index/controller/Newsletter.js?_dc=1370858690497

  • demo.localhost/extjs/index/view/newsletter/list.js?_dc=1432346523393

The first part, ‘demo.localhost/extjs/index’ is always the same, i set ExtJS that way that it uses that as a base path. This way, it always end up in my yii controller ‘ExtjsController’, in de ‘index’ action.

What after the base path follows, for example ‘view/newsletter/list.js?_dc=2134523423’, is used as a path to load the specific js source. So in my example, it should load the following file on my windows drive:


In fact, i should just return it to the browser (with file_get_contents i guess) with the correct js header.

The problem is, if i use the normal ‘controller/view’ way in the urlmanager, i can get the data ‘view/newsletter/list.js?_dc=23324324324’ from $_GET, but it’s then like this:

array(3) { ["_dc"]=> string(13) "1370858690497" ["view"]=> string(10) "newsletter" ["List.js"]=> string(0) "" }

And in case of loading a ExtJS controller, it’s like this:

array(2) { ["_dc"]=> string(13) "1370858690497" ["controller"]=> string(13) "Newsletter.js" }

Even if i should be able to get all the info out of the $_GET, to form the ‘broken’ link, because it uses parts of the link as indexes of the $_GET, i don’t know in what order the link to build up.

Is there a way that i can say in the urlmanager that only for the ‘index’ action of the ‘extjsController’, it sets the rest of the link (for example ‘view/newsletter/list.js?_dc=234235234’) in the $_GET as 1 parameter, or even better, give it as a parameter to the ‘index’ action? Like:

public function actionIndex($link)


    var_dump($link); // shows 'view/newsletter/list.js?_dc=234235234'



This must be possible???