Php Zf2-从其他模块访问布局
我有两个模块的相册和注册。我需要在注册模块中设置布局。我的困难在于,我需要在注册模块中为页面设置layout.phtml,但layout.phtml位于相册模块中。尝试使用EdpModuleLayouts 使用EdpModuleLayouts非常简单。在任何模块配置或自动加载的配置文件中,只需指定以下内容:Php Zf2-从其他模块访问布局,php,zend-framework2,Php,Zend Framework2,我有两个模块的相册和注册。我需要在注册模块中设置布局。我的困难在于,我需要在注册模块中为页面设置layout.phtml,但layout.phtml位于相册模块中。尝试使用EdpModuleLayouts 使用EdpModuleLayouts非常简单。在任何模块配置或自动加载的配置文件中,只需指定以下内容: 我得到了答案,在我的控制器/操作中使用了$this->layout(“anothermodule/layoutname”);而且工作正常。谢谢。。 array( 'module_la
我得到了答案,在我的控制器/操作中使用了$this->layout(“anothermodule/layoutname”);而且工作正常。谢谢。。
array(
'module_layouts' => array(
'Album' => 'layout/album',
'Signup' => 'layout/signup',
),
);