Forum: Ruby on Rails Theme Support for rails?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Torm3nt (Guest)
on 2009-03-04 00:58
(Received via mailing list)
Hey all,

I have a problem currently where I'm trying to enable "themes" for
rails, in
that views and layouts can be loaded from different locations, depending
on
the theme selected. Now, prefacing that I have tried every single
variation
of theme_support for Rails 2.1.0, all to no avail - it loads the views
fine,
but NEVER the layouts, resulting in (as you can imagine) a page with no
styles or head/body.etc.

I have even tried writing this myself by setting the view_paths, but
again -
no layouts ever get loaded. Is there some fundamental piece of the
puzzle
I'm missing and if so - what is it!?


Thanks in advance,

Kirk
Chris K. (Guest)
on 2009-03-05 11:47
(Received via mailing list)
I was looking for this same functionality some time back, and I never
found
it.  I looked at source from several other OS projects with theme
capabilities, and it didn't look like they solved it either, so I'm led
to
believe that layouts have to be in "app/views/layouts" (short of hacking
the
framework, of course) and nowhere else.  Would love to hear that I'm
wrong
though.
Alexey P. (Guest)
on 2011-06-29 01:43
Did such thing for my project, here's sample of multiple themes support:

http://ruby-lang.info/blog/blog
http://ruby-lang.info/blog/blog?theme=default

here's some docs
http://ruby-lang.info/blog/tool-for-theming-and-ra...
This topic is locked and can not be replied to.