I''m **thinking** that I want three levels of layouts: one level for the application, one level for each controller, and a third for each action. The top (application) would define the overall page with the header, side panels, maybe tabs. The second would define these areas further like what tabs. And the third would fill in the detailed content. Rails has two of these with layout and templates by default. Given that Rails has only two levels, is this really what I want and I''m just confused thinking I want a third level? It just seems like most of each of the controller''s layouts will be a lot of duplication. If not, and a third level is a good idea, are there any suggestions of how to do it in a "Rails" way? Thank you for your time, Perry -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> I''m **thinking** that I want three levels of layouts: one level for the > application, one level for each controller, and a third for each action.You want both a *layout* and a *view* for each action? I''m not sure that makes much sense to me... why not just merge it all into the view? As for having a layout per controller, you could have a single master layout that contained a call such as: render :partial => "layouts/#{@controller_name}" or some such...> The top (application) would define the overall page with the header, > side panels, maybe tabs. The second would define these areas further > like what tabs. And the third would fill in the detailed content. > > Rails has two of these with layout and templates by default. > > Given that Rails has only two levels, is this really what I want and I''m > just confused thinking I want a third level? It just seems like most of > each of the controller''s layouts will be a lot of duplication. > > If not, and a third level is a good idea, are there any suggestions of > how to do it in a "Rails" way? > > Thank you for your time, > Perry > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Philip Hallstrom wrote:>> I''m **thinking** that I want three levels of layouts: one level for the >> application, one level for each controller, and a third for each action. > > You want both a *layout* and a *view* for each action? I''m not sure > that > makes much sense to me... why not just merge it all into the view?I think a better way to think of it is that I want two levels of layouts, a global layout for the application and then a sub-layout per controller. What I came up with so far is that I have the normal layout per controller but they call application helpers that create most of the top level layout. The parameters that the per controller layout pass to the application helpers define the specifics of the layout for that controller. That seems to be working o.k. so far. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 9/25/07, Perry Smith <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''m **thinking** that I want three levels of layouts: one level for the > application, one level for each controller, and a third for each action. > The top (application) would define the overall page with the header, > side panels, maybe tabs. The second would define these areas further > like what tabs. And the third would fill in the detailed content. > > Rails has two of these with layout and templates by default. > > Given that Rails has only two levels, is this really what I want and I''m > just confused thinking I want a third level? It just seems like most of > each of the controller''s layouts will be a lot of duplication. > > If not, and a third level is a good idea, are there any suggestions of > how to do it in a "Rails" way?You''re not the first to think of this. Here''s a good article: http://www.marklunds.com/articles/one/360 --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---