Hi How do I create 1 layout file for the while site and have all controllers use that? I'd rather avoid copy/pasting for every controller I have. Thanks.
on 2007-07-15 03:02
on 2007-07-15 03:47
Create an application.rhtml in app/views/layouts
on 2007-07-15 03:53
Jean Nibee wrote: > Hi > > How do I create 1 layout file for the while site and have all > controllers use that? I'd rather avoid copy/pasting for every controller > I have. > > Thanks. The application.rhtml file in the layout directory is the default layout file that is used for the website. So by modifying that file the complete site will use that layout without having to include a :layout symbol with renders etc. If you want additional layouts add files to that directory and point to the additional layouts when you render etc: render 'whateversuperpage' :layout => 'anotherlayout'