-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New Template resolver just like PSR-4 autoloader #6437
Comments
If this is not clear, this issue states that we should have a new template path resolver just like AliasPathStackResolver of AssetManager |
I think the same comment as in issue #6357 (comment) applies here? |
@Martin-P No, I am talking about a template path resolver like PSR-4 autoloader. |
👍 |
👍 as well. Do you think you're able to build it? |
@Ocramius Okay. I will build it. |
@Martin-P it would be a different class here, not something set up by default. That's a decent segregation of concerns. |
So, just to be sure I'm getting it right, this new resolver works the same as ViewTemplatePathStack, except it doesn't include the first level of folder (one named like the module)? Playing devil's advocate here...but is a separate resolver class necessary for this? Couldn't we add an option like @weierophinney what's your take on this? |
@adamlundrigan They are different. The ViewTemplatePathStack resolver looks for a template in the array of template paths. And, the new one PrefixPathStackResolver resolver, looks for prefix. Every prefix has its one array of template paths. So, the template with prefix like |
Feature will be provided by #6963 |
I could not think of a better issue title.
Currently we should have "application" folder inside "view" folder of Application module. This is something like PSR-0 autoloader.
In a lot of cases, we only have one folder inside view folder of a module. So, I think there should be a new template resolver.
If this is done, we should not create "album" folder inside "view" folder of Album module.
I hope it's clear.
The text was updated successfully, but these errors were encountered: