<?php
		 
			$filetpl="<a href='\$href' target='\$target'>\$label</a>";
		 
			$style="nav navbar-nav navbar-right";
			$showlevel=6;
			$li_class='main-menu';
			echo sp_get_menu("main",$effected_id,$filetpl,$foldertpl,$ul_class,$li_class,$style,$showlevel,$dropdown);
			?>
			
			<script>
			$(".main-menu a").each(function(){
				if ($(this)[0].href == String(window.location) && $(this).attr('href')!="") {
					$(this).parents("li").addClass("active");
				}
				});
			</script>

以下是效果图