Hi, I will be creating a series of templates for a website. The user can select the template to personalize their view. Instead of writing different css for each layout as they will all contain the same information but with different colors or the background images will be different I was wondering if these values could be loaded into the css from a database when the user selects the layout. That way only 1 css file needs to be created. Is there something that works with rails3? Thanks in advance Mitch -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
not sure I would go about it this way. You could just dynamically apply a class in the view based on a single db value. Garrett Lancaster> ------------------------------------------------------------------------ > > Mitchell Gould <mailto:lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > February 2, 2011 11:26 PM > > > Hi, > I will be creating a series of templates for a website. > > The user can select the template to personalize their view. > > Instead of writing different css for each layout as they will all > contain the same information but with different colors or the background > images will be different I was wondering if these values could be loaded > into the css from a database when the user selects the layout. > > That way only 1 css file needs to be created. > > Is there something that works with rails3? > > Thanks in advance > > Mitch >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Garrett Lancaster wrote in post #979922:> not sure I would go about it this way. You could just dynamically apply > a class in the view based on a single db value. > > Garrett LancasterYou are so right. I think I will just create the different css and html for each template. Easier and I won''t have that many templates. Thank you for your suggestion. Mitch -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.