Module level layouts and controllers


Is it at all possible to have a layout for a module?
For example I have a module called ‘admin’ and one called ‘shop’. One
the frontend and one is the backend. However, I’d like a layout for
module area as obviously the two will be quite different although in
cases the functionality (controller) maybe very similar.

Any pointers would be very gratefully recieved.

All the best.



Doug B. wrote:

Is it at all possible to have a layout for a module?

I was looking for this the other day. Looks like EdgeRails has some
support for getting the right layout for a controller in a module, but
doesn’t yet have support for a default layout for all controllers in a
module. I’d love to see this too, though I do wonder what the name and
placement of the layout should be. I suppose for the admin module
something like the following would work. Note that I’ve added a special
layout in the admin module, but the default would be the admin.rhtml.


I’ve looked at the Rails code for this just a bit, but I haven’t really
put in enough time to have an idea of how hard it would be to make this