Forum: Ruby on Rails template wrapper

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.
Charlie B. (Guest)
on 2005-12-13 02:00
I've been a die hard perl user for several years, but I'm seriously
thinking of giving the rails thing a try.  I've been doing a little
playing with it but I can't figure out how to create a wrapper template.
With perl I use the template-toolkit and with it I can create a wrapper
template that "wraps up" my content templates.  The idea being that the
header,navbar,and footer don't change from page to page and there's no
need to cut and paste this into each template.  Can I do this with ruby?
Please say yes because I'm starting to really like rails!
Kyle M. (Guest)
on 2005-12-13 02:08
(Received via mailing list)
They're called layouts, and are located in the app/views/layouts
folder.  The layout with the same name as the controller is
automagickally applied to your views.  You can override the layout
with the render or layout commands in the controller.

API docs:
http://api.rubyonrails.com/classes/ActionControlle...
Charlie B. (Guest)
on 2005-12-13 02:51
Beautiful! If rubys templating system works as well as the
template-toolkit, I'll be done with perl for the web!
This topic is locked and can not be replied to.