Multiple "view" directories to achieve rails "themes"

Hi

I’d like to have various “themes” for my site that cannot be achieved
by changing the CSS or anything else.

So my directory structure might look like this:

app
\ views
-
\ users
\ blogs
-
\ THEME2
-
\ users
\ blogs

(where the two “users” directories contain all the erb or haml)

With my controllers - is there a way to conditionally insert the
“theme2” directory into the view path before the erb/haml gets
searched for and rendered ???

Would be nice to no have to explicitly call render

I’m using rails3

Any ideas?

thanks!

Maybe I just need to ask it this way:

At the end of every action the “render” function is called
automatically with no options (unless the programmer explicitly calls
it).

Any clues as to how I would override that method to modify the folder
path for the “view” files?

Any tips would be heaps appreciated

thanks guys

[email protected] wrote:

Maybe I just need to ask it this way:

At the end of every action the “render” function is called
automatically with no options (unless the programmer explicitly calls
it).

Any clues as to how I would override that method to modify the folder
path for the “view” files?

Any tips would be heaps appreciated

You might want to look at http://github.com/cavneb/themes .

thanks guys

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs