mauricemach/coffeekup — Issue #111: Blocks / place holders in layouts
Author: ejsmith
Created: 2012-02-16 17:39:46+00:00
State: open

I want to provide place holders for content in my layout template that I can implement in my child templates. I have tried everything I can think of but I can only specify string values to be placed in the place holders and not complete html sections.

## layout

doctype 5
html lang: 'en', ->
head ->
title "#{@title} - Site" if @title?
@headsection if @headsection?
body ->
p 'some content'

## child template

@title = 'blah'

@headsection = ->
script src: 'blah'

p 'Child content'