在基于 Haml 的 Padrino 解决方案中,我有一个application.haml
这样的:
!!!
%html
%head
%title "blah"
%body
#header
= yield_content :headcontent
#container
...
对于:headcontent
,在我的页面(例如index.haml
)我有
- content_for :headcontent do
#headcontent
%h2= "Index header stuff"
#content
...
我想要做的是使内容页面index.haml
可以选择指定- content for :headcontent
. 那就是我想application.haml
包含一些仅在页面不执行时才呈现的默认值 。:headcontent
- content for :headcontent
我该怎么做呢?