Just a way to specify an alternate route for ajax requests, Mainly in pagination, sort etc.
So when the ajax function is firing it first looks for the url in the data attribute defaulting to the href if one isn’t found.
url = $(this).data('jsroute') || this.href;
is it a question alex?
Do you want to find a way? Why don’t you just find out on the route if it is an ajax request (http://www.yiiframework.com/doc/api/1.1/CHttpRequest#getIsAjaxRequest-detail) or not and act according to the request? Will be easier than putting your views with different routes, dont you think?
in the onBeginRequest event
This could just be the specific way I’ve used Yii.
If ajax can be used it uses a different route with a controller that will work with the widget.