       type:     @type,
       target:   @target,
     )
+    
+    if !@target
+      @target = @menu[0]['target']
+    
     for menu in @menu
-      @el.find('.nav-tab-content').append('<div class="tabbable" id="' + menu.target + '">' + menu.name + '</div>')
-      if menu.controller
+      @el.find('.nav-tab-content').append('<div class="tabbable" id="' + menu.target + '"></div>')
+      if menu.controller && ( @toggleable is true || ( @toggleable is false && menu.target is @target ) )
         params    = menu.params || {}
         params.el = @el.find( '#' + menu.target )
         new menu.controller( params )
 
     @el.find('.tabbable').addClass('hide')
-    if @target
-      @el.find( '#' + @target ).removeClass('hide')
-    else
-      @el.find('.tabbable:first').removeClass('hide')
-
-    @el.find('[data-toggle="tabnav"]:first').addClass('active')
-
+    @el.find( '#' + @target ).removeClass('hide')
+    @el.find('[data-toggle="tabnav"][href*="/' + @target + '"]').parent().addClass('active')
     
   toggle: (e) ->
     return true if @toggleable is false

    super

  render: ->
    @log 'ttt', @target, @
    # set title
    @title @page.title
    @navupdate @page.nav

        @modalHide()
      error: =>
        @log 'errors'

        @modalHide()
    )

