Multiple files for the same template

List Recv
Wed, 07 Dec 2005 06:31:27 -0000

Is there anyway to create an ERb/.rhtml template, telling it to try to
include the contents of another file, and, if not, fallback to a
default?

More specifically, I have the site running under multiple "skins", for
different brand names.  I can illustrate this with an example:

I might have in views:
/views/order/pizza.rhtml
/views/order/coke.rhtml

Now, I may have customized pizza.rhtml for one customer, but not for the
other.  So, I''d like rails to first try looking for pizza.rhtml in
/views/customized/joespizza/order/pizza.rhtml, and, if it''s not there,
look in the regular /views/order/pizza.rhtml.

Any good way to do this?

--
Posted via http://www.ruby-forum.com/.