template
method:
template :layout do "%html\n =yield\n" end template :index do '%div.title Hello World!' end get '/' do haml :index endIf a template named
layout
exists, it will be used each time a template is rendered.
You can individually disable layouts by passing :layout => false
or disable them by default via set :haml, :layout => false
:
get '/' do haml :index, :layout => !request.xhr? end