Switch to mobile, tablet, or other layout in Zend Framework 1.11

The problem

We want to implement a method to completely switch layout of our Zend Framework application without loosing flexibility. The solution must give us the possibility of switching all layouts and  the views of the controllers we want.

Other’s solutions

I found some solutions on the Web, but I decided to post this article because no one satisfies my needs. They all resort to ContextSwitch to handle views file names, but, in my applications, I just use ContextSwitch in some actions for other purpose, so I’m unable to apply them without restructure existing code.

My solution

Continua a leggere