Ok, then try this.

-------------------------------------------------------------------------------
<?php
namespace Application;

use Zend\Mvc\ModuleRouteListener;
use Zend\Mvc\MvcEvent;
use Zend\EventManager\EventInterface;

class Module
{
        //..

    public function onBootstrap(EventInterface $event)
    {
        $app = $event->getParam('application');
        $layout = $app->getMvcEvent()->getViewModel();

        if( $app->getRequest()->isXmlHttpRequest() )
        {
            $layout->setTerminal(true);
        }
}
-------------------------------------------------------------------------------



2013/2/13 Katalin <catalin_...@yahoo.com>

> Hi. I have plenty of modules and actions. You solution doesn't fit.
>
>
>
> --
> View this message in context:
> http://zend-framework-community.634137.n4.nabble.com/Don-t-display-layout-if-ajax-request-tp4659147p4659149.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
> --
> List: fw-general@lists.zend.com
> Info: http://framework.zend.com/archives
> Unsubscribe: fw-general-unsubscr...@lists.zend.com
>
>
>


-- 
Pierre Rambaud
Website: http://rambaudpierre.fr
G+: https://plus.google.com/u/0/107809758756474139920/posts
Github: https://github.com/PierreRambaud

Reply via email to