sorry found late

$em->attach(MvcEvent::EVENT_DISPATCH, function($e) {
            $controller = $e->getTarget();

            if ($controller instanceof Controller\AdminController) {
                $controller->layout('layout/layoutadmin.phtml');
            }



        });

dont forget to add this in your module.config.php
'controllers' => array(
        'invokables' => array(
            'Application\Controller\Index' =>
'Application\Controller\IndexController',
            'Application\Controller\Admin' =>
'Application\Controller\AdminController'

        ),
    ),

and create admin/index.phtml in your view folder

On Sat, Aug 11, 2012 at 2:40 PM, sina miandashti <s...@teamatec.com> wrote:

> hi
>
> i want to know how can i make my module using custom layout phtml file for
> other controller ... for ex. AdminController
>
> using DI
>
>
> thanks
>



-- 
________________
Sincerely
Sina Miandashti
www.InTheMix.ir  Admin
www.teamatec.com Head PHP Developer

Reply via email to