I have a task to implement the mobile version of our Yii based ecommerce application. I am pretty comfortable with PHP but more of a HTML/CSS guy. I have been following the Yii book tutorial to gain a better understanding of PHP and frameworks in particular.
We have a fairly complex ecommerce platform that uses Yii for the frontend and we need a mobile version. I would like to keep it as best practice as possible. We have some view elements (search fields etc.) that should not be displayed in the mobile version (typical single column mobile layout).
How can I prevent a controller from rendering a view in the mobile version? I have read that the app will check the theme folder for an equivalent view and if none is found, will render the default. This is obviously not desired here. Do I need to create empty PHP view files in the theme folder so that nothing is rendered by the controller in this case?
But in my catalog controller actionIndex render() is called more than once (an entire left column in a product catalog list page with search functions for example as well as the list of products in the right column). These render calls cannot be prevented without modifying the controller as far as I can see.