2013-08-21 101 views
0

我有兩個模塊相冊和註冊。我需要在註冊模塊中設置佈局。我的困難在這裏,我需要在註冊模塊中爲頁面設置一個layout.phtml,但layout.phtml位於相冊模塊中。Zf2 - 從其他模塊訪問佈局

回答

0

嘗試使用EdpModuleLayouts https://github.com/EvanDotPro/EdpModuleLayouts

「使用EdpModuleLayouts是非常非常簡單的在任何模塊的配置和自動加載的配置文件,只需指定以下內容:」

array(
    'module_layouts' => array(
    'Album' => 'layout/album', 
    'Signup' => 'layout/signup', 
), 
); 
+0

我得到了答案,在我的控制器/ action使用$ this-> layout(「anothermodule/layoutname」);並且正確地工作。Thankyou .. – Anna