Views organisation

Hi,

I don’t know how dev team plans to organize views (views folder) in new 2.0 framework, but I remember some suggestions to 1.1 branch to clearly separate layouts folder from views folder.

Current implementation not only disallow to have layouts set of views for example for LayoutsController (which might be necessary for many more complex projects). It also introduces some disorganisation, especially in large projects, with many controllers and views.

I don’t know what are others’ opinions on that, but I would strongly support the idea to move protected/views/layouts to protected/layouts folder.

Regards,

Trejder

disagree

because every module can have a layout and protected/views/layouts is the layout of the default "module"

I don’t see a problem with current implementation. First of all, it’s better to name controllers in singular so LayoutController, not LayoutsController. mbi’s argument is also valid.

I don’t follow you, but this might be caused by my lack of knowledge and experience in using modules (a rather new thing for me).

@mbi: What would be the problem with having "default" module layouts kept in protected/layouts and for particular module in protected/modules/name/layouts?

@samdark: If we’re going down to organisational and naming part, I would rather say that I would use LayoutController (singular) for implementation of all actions related to currently selected by user layout and LayoutsController for implementing operations on group of layouts, like adding, removing, configuring etc. But I agree that this purely organisational case and your solution is also OK.