search for: default_layout

Displaying 1 result from an estimated 1 matches for "default_layout".

2008 May 27
1
Camping Technique -- Multiple Layouts
Hey Campers, Here''s a little technique you can use to support multiple layouts within a Camping app. def layout @layout ||= ''default'' send("#{@layout}_layout") { yield } end The minimum you have to do after this is define a *default_layout*, but (as you can hopefully see) you may define any number of arbitrary layouts to wrap your content in. Just set *@layout* in your controllers, and when it comes time to render a view, be sure a layout w/ the name "#{@layout}_layout" exists. --beppu -------------- next part -----------...