I have a web page that uses Haml for layouts. \"layout.haml\" is a separate layout file which is used when rendering any actual Haml page.
layout.haml looks something l
This solution is for Ruby on Rails only:
You can use yield(:location)
and the content_for(:location)
methods. "Using the content_for Method" has more information.
layout.haml:
!!!
%html
%head
%title= yield(:title)
= yield(:head)
%body
= yield
view.haml:
- content_for(:title, 'My title')
- content_for(:head) do
= javascript_include_tag :foo
%h1 My view!