0

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.

1 Answers1

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