I'm using padrino with my website, and need to override the default layout to use a different layout in certain situations i.e. when a user clicks on a certain thing.
Asked
Active
Viewed 37 times
1 Answers
0
Padrino documentation gives these examples:
SimpleApp.controllers :posts do
# Apply a layout for routes in this controller
# Layout file would be in 'app/views/layouts/posts.haml'
layout :posts
get("/posts") { render :haml, "Uses posts layout" }
end
SimpleApp.controllers :admin do
get :index do
render "admin/index", :layout => :admin
end
get :show, :with => :id do
render "admin/show", :layout => false
end
end

Kimmo Lehto
- 5,910
- 1
- 23
- 32