App.PageBodyComponent = Ember.Component.extend
  setTemplate: (->
    body = @get('page.body')
    body ||= ""
    try
      template = Ember.HTMLBars.compile(body)
    catch
      template = Ember.HTMLBars.compile(tspan('page.cannot_compile'))
    @set 'layout', Ember.HTMLBars.template(template)
    @rerender()
  ).on('init').observes('page.body')
