-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Templatemap generator: keys of templatemap not correct? #4612
Comments
Where are you placing the generated template map file? Based on what it generated, it should be in the root of your module, and you should likely |
@weierophinney please view my example here https://github.com/tranba/TestApp |
I see the problem with the template map -- the keys should not include "view/" in them. I tried this on a module of my own, and had the same results -- "view/" was prefixed to all keys. To get it to work, I did the following:
This generated the template map correctly. So, use that as a workaround until we get a fix for the script. |
Thanks! |
@weierophinney @tranba i just created two pull requests to fix this in different ways One time to do it with the parameter "--useViewPath", or one with the direct fix: |
Please keep in mind that the second might be a BC break, if someone already used the alias with the "view" prefix.... |
Maybe #4834 for 2.2.2 and the other for 2.3.0? |
IMO, the way of generate the classmap should be simple and agnostic to the framework internals. For that reason #4834 offer the switch for enable or disable zf2 specific needs. |
When i using templatemap_generator to create template file map for my module, ex for Album module:
If I using this file in my application and access to index page I will received error:
Zend\View\Renderer\PhpRenderer::render: Unable to render template "album/album/index".
Problem is PhpRenderer load "album/album/index" template, not "view/album/album/index"
The text was updated successfully, but these errors were encountered: