On May 26, 5:18 pm, Colin Law <[email protected]> wrote: > On 26 May 2011 22:05, egervari <[email protected]> wrote: > > > I have 2 pages that have almost the same content except for stuff in > > the middle. I'd basically like to have a sub-layout that wraps the > > content that is different - exactly the way a normal layout file > > would. > > You can use yield and content_for, have a look at the Rails Guide on > Layouts and Rendering. > > Colin
Maybe I should just be more explicit. How do I do this? :P I don't see how content_for can solve this problem. Even if it can, I can imagine ways to solve it far more easily/elegantly. I essentially want to take a bunch of header/footer html that is really big and put it into a custom tag - to give you an analogy of the java world. Freemarker also lets you create macros that do the very same thing. There has to be an equivalent. I'd be really disappointed if there wasn't. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

