<%@ page contentType="text/html; charset=GBK"%>
<%@ taglib uri="/cms4j" prefix="cms4j" %>

<%@ page import = "cn.com.dekn.cms.util.*,cn.com.dekn.common.util.*" %>


<%
/***********************************
* 显示特性参数初始化
***********************************/
//要获取路径信息的classID
String CLASS_ID = ParamUtil.getStrParam(request,"CLASS_ID",""); 

//栏目文章显示页
String CLASS_URL = ParamUtil.getStrParam(request,"CLASS_URL","ShowClass.jsp"); 

//子栏目显示页
String CLASS_LIST_URL = ParamUtil.getStrParam(request,"CLASS_LIST_URL","ShowClassList.jsp");

//首页URL
String HOME_URL = ParamUtil.getStrParam(request,"HOME_URL","index.jsp"); 

//文字颜色
String TEXT_COLOR = ParamUtil.getStrParam(request,"TEXT_COLOR",""); 

//分隔符
String SPEARATOR = ParamUtil.getStrParam(request,"SPEARATOR"," >> ");

//分隔符颜色
String SPEARATOR_COLOR = ParamUtil.getStrParam(request,"SPEARATOR_COLOR","");

//是否显示首页
boolean IS_SHOW_HOME = ParamUtil.getBooleanParam(request,"IS_SHOW_HOME","false"); 

//是否显示首页
boolean IS_LINK = ParamUtil.getBooleanParam(request,"IS_LINK","true"); 

//栏目ID参数名称
String CLASS_ID_PARAM_NAME = ParamUtil.getStrParam(request,"CLASS_ID_PARAM_NAME","id"); 

%>

<% int spearatorCount = 0;%>

<% if(IS_SHOW_HOME){ %>
	<% if(IS_LINK){%>
	<a href="<%=HOME_URL%>">
	<% } %>
	<font color="<%=TEXT_COLOR%>">首页</font>
	<% if(IS_LINK){%>
	</a> 
	<% } %>
	<%
	//如果获取不到CLASS_ID,则不显示
	if(CLASS_ID.length() <= 0){
		return;
	}
	%>
	
	
	<%++spearatorCount;%>
<% } %>

<cms4j:class id="<%=CLASS_ID%>">

	<% String classPath[] = class_info.getPATH2();%>
	<% for(int index = 0 ;index<classPath.length;index++) { %>
		<cms4j:class id="<%=classPath[index]%>">
			<%
			if(class_info.getIS_SHOW() == 1){
			%>
			
				<% if (spearatorCount > 0){ %>
				 <font color="<%=SPEARATOR_COLOR%>"><%=SPEARATOR%></font> 
				<% } %>
				<%++spearatorCount;%>
				<% if(IS_LINK){%>
				<a href="<%=class_info.getLinkURL(CLASS_URL,CLASS_LIST_URL,CLASS_ID_PARAM_NAME)%>">
				<% } %>
				<font color="<%=TEXT_COLOR%>"><%=class_info.getCLASS_NAME()%></font>
				<% if(IS_LINK){%>
				</a>
				<% } %>
			
			<%
			}
			%>
			
		</cms4j:class>
	<% } %>
</cms4j:class>
