Hi guys, after hundreds of unsuccessful attempts, I’ll have to ask here: how to make Yii return a Javascript controller file?
I’ll tell you why. I’m a Ext JS programmer (I’ve already used Ext4Yii) and in this framework the view is a Javascript file. With Ext JS the view is 100% Javascript.
So I was trying to figure out a way that I have 2 types of URL, e.g.:
index.php/sales.js
index.php/sales.json
The.js will return my Ext JS view "views/sales/index.js", and the .json will return data (I will have study another time how to return JSON).
Does anyone have a clue how to make this work? Would be the most suitable architecture for my webapp.
Yes, url suffix simply add a suffix to the url, in order to looks like an html page.
There is not the possibilty of writing rules about the suffix, that what I ment with my post, is anyway possible to change the suffix of some page (so is possible to create sales.js), but is not possible for the actual CurlManager to distinguish sales.js from sales.json