ZF2-214: TemplatePathStack::resolve - view script path not chosen correctly
- 2 existing modules, both have a 'view' folder inside the 'src' folder
- both modules have a controller 'IndexController' and action 'index'
- different routes to each IndexController::indexAction exist
- the module specific view path is added via module.config.php of its module to TemplatePathStack
- TemplatePathStack::resolve does choose the first view path where a /index/index.phtml is found
So the order of paths in TemplatePathStack (result of config merging) determines the chosen view script.
involved code (in my case):
PhpRenderer::render downto PhpRenderer::resolver downto AggregateResolver::resolve downto TemplatePathStack::resolve
What should happen imho, is that the routeMatch controller namespace defines the view script path somehow.
Thank you for having a look at this.
Best regards, Jade