     path: '/admin/blog'
     controller: 'BlogController'
 
-    onBeforeAction: (pause) ->
-
+    onRun: ->
       if Blog.settings.blogAdminTemplate
         @template = Blog.settings.blogAdminTemplate
 
+    onBeforeAction: (pause) ->
       if Meteor.loggingIn()
         return pause()
 

    controller: 'BlogController'
    notFoundTemplate: 'blogNotFound'

    onBeforeAction: ->
      if Blog.settings.blogShowTemplate
        @template = Blog.settings.blogShowTemplate


    path: '/admin/blog/edit/:id'
    controller: 'BlogController'

    onRun: ->
      if Blog.settings.blogAdminEditTemplate
        @template = Blog.settings.blogAdminEditTemplate

    onBeforeAction: (pause) ->
      if Meteor.loggingIn()
        return pause()

