我需要ZF2中的两个不同的模板映射,一个用于admin和oen用于前端,目前我可以看到的是ZF2合并使用的2个module.config.php文件在我配置的2个模块中,并导致我需要为管理员设置的模板映射,以便在前面的模块中加载。配置ZF2 view_manager加载2个单独的模板地图
的应用/ module.config.php
...
'view_manager' => array(
'display_not_found_reason' => true,
'display_exceptions' => true,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => array(
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
'application/index/index' => __DIR__ . '/../view/application/index/index.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
),
'template_path_stack' => array(
__DIR__ . '/../view',
),
...
的/管理员module.config.php
...
'view_manager' => array(
'template_path_stack' => array(
'admin' => __DIR__ . '/../view',
),
'template_map' => array(
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
),
),
...
我应该怎么修改,这样我可以加载单独的 “view_manager” 阵列2个独立的模块?
为什么需要那个? –