def obtain_tag_cloud(type, sub_only = false)

      article_url = Setting.get('articles_slug')
      tag_url = Setting.get('tag_slug')
      segments = params[:slug].split('/')

      if type == 'string'
        return '' if not defined?(@content.terms)
        terms = @content.terms.where(roroacms_term_anatomies: {taxonomy: 'tag'}).includes(:term_anatomy)
        return terms.all.map do |u|
          url = article_url + '/' + tag_url + u.structured_url
          "<a href='#{site_url(url)}'>" + u.name + "</a>"
        end.join(', ').html_safe

      elsif type == 'list'

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

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

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

        else
          # get all the tags
          terms = Term.where(roroacms_term_anatomies: {taxonomy: 'tag'}, :parent_id => nil).includes(:term_anatomy)
        end
        # if you want a list style
        li_loop_for_terms(terms.arrange, tag_url)

      end

    end
def obtain_tag_cloud(type, sub_only = false)

      article_url = Setting.get('articles_slug')
      tag_url = Setting.get('tag_slug')
      segments = params[:slug].split('/')

      if type == 'string'
        return '' if not defined?(@content.terms)
        terms = @content.terms.where(roroacms_term_anatomies: {taxonomy: 'tag'}).includes(:term_anatomy)
        return terms.all.map do |u|
          url = article_url + '/' + tag_url + u.structured_url
          "<a href='#{site_url(url)}'>" + u.name + "</a>"
        end.join(', ').html_safe

      elsif type == 'list'

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

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

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

        else
          # get all the tags
          terms = Term.where(roroacms_term_anatomies: {taxonomy: 'tag'}, :parent_id => nil).includes(:term_anatomy)
        end
        # if you want a list style
        li_loop_for_terms(terms.arrange, tag_url)

      end

    end
returns either a list or a tag cloud of the tags - this shows ALL of the tags
 Params:
 +type+:: string or list style
 +sub_only+:: show only the sub tags of the current category