def obtain_category(check = nil)
      segments = []
      if check.blank?
        return nil if  params[:slug].blank?
        segments = params[:slug].split('/')
      end

      # get the taxonomy name and search the database for the record with this as its slug
      t = obtain_term_check(check, segments, 'category')
      t if !t.blank?
    end
def obtain_category(check = nil)
      segments = []
      if check.blank?
        return nil if  params[:slug].blank?
        segments = params[:slug].split('/')
      end

      # get the taxonomy name and search the database for the record with this as its slug
      t = obtain_term_check(check, segments, 'category')
      t if !t.blank?
    end
returns the data for a certain category
 Params:
 +check+:: ID, slug, or name of the category - if this is nil it will return the current category you are in