New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure the folders in APP/View #1975
Comments
11th Jul 2012, Mark Story said: What if there is no theme? Also couldn't we also move view + helper classes somewhere at the same level as App/View instead of making more deeply nested directories? Or just have I personally would like to see theme's just go away, and just become plugins. But I think that is a parallel discussion to this. |
11th Jul 2012, Florian Krämer said: I agree about the nested folders. I also thought about APP/Template, would be a good alternative. When there is no theme specified it would use the default theme like APP/Template/default. If themes become plugins (pretty confusing IMO) we will need to provide a simple way to link their assets to the webroot. |
11th Jul 2012, Mark Story said: There are a few benefits of having plugins == themes
Requiring a |
11th Jul 2012, Florian Krämer said: This would be ok as well, but I don't like the idea of mixing themes with other plugins in the same directory. So why not use APP/Template or APP/Theme for that? |
11th Jul 2012, dogmatic69 said: Having themes as a standalone "plugin" seems like a nice idea. You can easily App::build() a new dir to act like a Plugin dir. eg:
|
11th Jul 2012, Florian Krämer said: I'm aware of that possibility but having it APP . 'Theme' (why plural?) available would make it obvious even to the less aware people. But there is still the problem that you'll have to do something manually to get the themes assets copied or symlinked to the webroot dir. If not they'll all go through the dispatcher. |
11th Jul 2012, dogmatic69 said: The problem of symlinking assets for plugins too. You can not have more than one webroot for a server vhost, and plugin theme assets are generally self contained. I doubt there is any way around this besides symlinking them manually. Its not to hard to script it up and make it part of your install / deploy anyway. |
Is is resolved with 3.0 and themes/plugins being unified? |
I think so, but the work to combine themes and plugins has not yet been completed. |
We already have a ticket for making themes into plugins |
Created by Florian Krämer, 11th Jul 2012. (originally Lighthouse ticket #3025):
Having the views template folders at the same level as the view classes and helpers feels somehow not well organized and you can end up mixing regular view files with helpers in the case you have a HelpersController and by this a view for it.
I would propose to change this to:
Instead of having
APP/View/<Controller>
I proposeAPP/View/Template/<Theme>/<Controller>
for plugins I proposeAPP/View/Template/<Theme>-<PluginName>/<Controller>
As you can see I would also drop the separation between the "normal" view level and theme views. It felt always a little odd to me that views outside of a theme got a special "app" level role.
The text was updated successfully, but these errors were encountered: