I have been trying to do the following with Zend Framework – a simple ajax request and returns the contents in a container. However, the problem was that the contents being returned included headers like css files and script files. I did not need the layout.
I was finally able to do this using the following line in a controller:
As the line implies, it just disables the layout of the returned contents and takes only the template contents.