Hi guys, I have a very simple question that I just can’t seem to figure out. I have a piece of code shown below, the problem is this will not work if you change the way urlManager works. How do I make this work for either case of using or not using urlManager?
Reason for code: need to run specific code from a page based on the URI
If you want to test for a specific route, it would be safer to verify Yii::app()->controller->route. It contains the route of the current request. In view context this can be accessed with $this->route.