def menu_routing(menuOption) 

			# create a hash of the menu option id
			existingData = make_hash menuOption.custom_data

			# create generic variables
			home_id = Setting.get('home_page')	
			article_url = Setting.get('articles_slug')	
			category_url = Setting.get('category_slug')	
			tag_url = Setting.get('tag_slug')	
			
			# start the string by defining the target 
			atts = get_target(existingData['target'])
			p = Post.find_by_id(existingData['linkto'])
			blog = false

			if menuOption.data_type == 'page' && !p.blank?
				
				url = p.id == home_id.to_i ? site_url() : site_url(p.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == 'article' && !p.blank?

				url = site_url(article_url +  p.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == 'category'

				t = Term.find(existingData['linkto'])
				url = site_url(article_url + '/' + category_url + t.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == 'tag'

				t = Term.find(existingData['linkto'])
				url = site_url(article_url + '/' + tag_url + t.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == article_url && menuOption.option_id == 0 

				url = site_url(article_url)
				atts += " href='#{url}' class='menu_link'"
				blog = true

			elsif menuOption.data_type == 'custom'

				url = existingData['customlink']
				atts += " href='#{url}' class='menu_link'"

			end

			atts = (atts[0..-2] + " #{existingData['class']}'") if !existingData['class'].blank?

			if blog && request.original_url.include?(url)
				atts = (atts[0..-2] + " active'") 	
			else
				atts = (atts[0..-2] + " active'") if url == request.original_url
			end


			atts

		end
def menu_routing(menuOption) 

			# create a hash of the menu option id
			existingData = make_hash menuOption.custom_data

			# create generic variables
			home_id = Setting.get('home_page')	
			article_url = Setting.get('articles_slug')	
			category_url = Setting.get('category_slug')	
			tag_url = Setting.get('tag_slug')	
			
			# start the string by defining the target 
			atts = get_target(existingData['target'])
			p = Post.find_by_id(existingData['linkto'])
			blog = false

			if menuOption.data_type == 'page' && !p.blank?
				
				url = p.id == home_id.to_i ? site_url() : site_url(p.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == 'article' && !p.blank?

				url = site_url(article_url +  p.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == 'category'

				t = Term.find(existingData['linkto'])
				url = site_url(article_url + '/' + category_url + t.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == 'tag'

				t = Term.find(existingData['linkto'])
				url = site_url(article_url + '/' + tag_url + t.structured_url)
				atts += " href='#{url}' class='menu_link'"

			elsif menuOption.data_type == article_url && menuOption.option_id == 0 

				url = site_url(article_url)
				atts += " href='#{url}' class='menu_link'"
				blog = true

			elsif menuOption.data_type == 'custom'

				url = existingData['customlink']
				atts += " href='#{url}' class='menu_link'"

			end

			atts = (atts[0..-2] + " #{existingData['class']}'") if !existingData['class'].blank?

			if blog && request.original_url.include?(url)
				atts = (atts[0..-2] + " active'") 	
			else
				atts = (atts[0..-2] + " active'") if url == request.original_url
			end


			atts

		end
create the a links with the given attributes
 Params:
 +menuOption+:: is the menu option record