 class Neck.Helper.yield extends Neck.Helper
-  attributes: ['yieldView']
+  attributes: ['yieldView', 'yieldReplace']
   template: true
+  replace: false
 
   constructor: ->
     super

    if @scope.yieldView
      @append @scope.yieldView

  _createController: (controllerPath, params, parent)->
    Controller = Neck.DI.load(controllerPath, type: 'controller')
    controller = new Controller template: "#{controllerPath}", params: params


    controller

  append: (controllerPath, params, refresh = false, replace = @replace)->
    if replace and @_yieldChild
      if controllerPath is @_yieldChild._yieldPath and not refresh
        @_yieldChild._yieldChild?.remove()
