def obtain_category_list(sub_only = false)

      segments = params[:slug].split('/')
      category_url = Setting.get('category_slug')
      # variables and data

      # check to see if we are on the category term type, that we just want the sub cateogries and the segments actually exist
      if segments[1] == category_url && sub_only && !segments[2].blank?

        # get the current category
        parent_term = Term.where(roroacms_term_anatomies: {taxonomy: 'category'}, :structured_url => "/" +  segments.drop(2).join('/')).includes(:term_anatomy).first

        terms =
          if !parent_term.blank?
            # get all the records with the current category as its parent
            Term.where(:parent_id => parent_term.id)
          else
            []
          end

      else
        # get all the categories
        terms = Term.where(roroacms_term_anatomies: {taxonomy: 'category'}, :parent_id => nil).includes(:term_anatomy)
      end

      li_loop_for_terms(terms.arrange, category_url)

    end
def obtain_category_list(sub_only = false)

      segments = params[:slug].split('/')
      category_url = Setting.get('category_slug')
      # variables and data

      # check to see if we are on the category term type, that we just want the sub cateogries and the segments actually exist
      if segments[1] == category_url && sub_only && !segments[2].blank?

        # get the current category
        parent_term = Term.where(roroacms_term_anatomies: {taxonomy: 'category'}, :structured_url => "/" +  segments.drop(2).join('/')).includes(:term_anatomy).first

        terms =
          if !parent_term.blank?
            # get all the records with the current category as its parent
            Term.where(:parent_id => parent_term.id)
          else
            []
          end

      else
        # get all the categories
        terms = Term.where(roroacms_term_anatomies: {taxonomy: 'category'}, :parent_id => nil).includes(:term_anatomy)
      end

      li_loop_for_terms(terms.arrange, category_url)

    end
Returns a list of the categories
 Params:
 +sub_only+:: show only the sub categories of the current category