 
       @editor.setContent Encoder.htmlDecode template.rawContent
       @readme.setContent description
+      @variables.setContent ''
+      @variablesController.setData data
       @logs.setContent 'Stack template loaded'
 
       @_saveSnapshot id


  setTemplateData: (data) ->

    if data
      @setData data
      @toolbar.setData data

    { _id: id, title, description, template } = @getData()
    unless id or description or template

    return no  unless id
    return no  unless snapshot = @_snapshots[id]

    for view in EDITORS
      @[view]._restore snapshot[view]
    @_current = id

