 
 # Return current post if we are editing one, or empty object if this is a new
 # post that has not been saved yet.
-getPost = ->
-  (Post.first()) or {}
+getPost = (id) ->
+  (Post.first( { _id : id } ) ) or {}
 
 # Find tags using typeahead
 substringMatcher = (strs) ->


Template.blogAdminEdit.helpers
  post: ->
    getPost()

Template.blogAdminEdit.events
  # Toggle between VISUAL/HTML modes

    # Load post body initially, if any
    if sub.ready() and not ranOnce
      ranOnce = true
      post = getPost( Session.get('postId') )
      if post?.body
        @$('.editable').html post.body
        @$('.html-editor').html post.body
