<%@ tag language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/cms/front/include/taglib.jsp"%>
<%@ attribute name="categoryList" type="java.util.List" required="true" description="栏目列表"%>
<c:forEach items="${categoryList}" var="tpl" varStatus="status">
  	<c:if test="${status.index le '4'}"> 
  	<div class="listfont" >
  	    <div style="float:left;">
  	      <p style="vertical-align: middle;">
  	      	<font class="icon">
  	      		<img src="assets/images/to.png"/>
  	      	</font>${status.count}.</p>
  	    </div>
  	    <c:choose>
   			<c:when test="${not empty tpl.href}">
    			<c:choose>
	    			<c:when test="${fn:indexOf(tpl.href, '://') eq -1 && fn:indexOf(tpl.href, 'mailto:') eq -1}">
	    			<c:set var="url" value="${ctx}${tpl.href}"/></c:when><c:otherwise><c:set var="url" value="${tpl.href}"/></c:otherwise>
	    		</c:choose>
   			</c:when>
   			<c:otherwise><c:set var="url" value="${ctx}/list-${tpl.id}${urlSuffix}"/></c:otherwise>
   		</c:choose>
   		<div style="float:left;">
   		<p  class="${requestScope.category.id eq tpl.id ?'menu_activ':''}" style="mar: middle;" >
			<c:choose><c:when test="${fn:length(tpl.name) gt 12}">
				<a href="javascript:;"  onclick="loadPage('${url}')" target="${tpl.target}"  style="line-height:16px;padding-top:5px;">${tpl.name}</a>
			</c:when><c:otherwise>
				 <a href="javascript:;"  onclick="loadPage('${url}')" target="${tpl.target}" ${fn:length(tpl.name) gt 10?'style="font-size:12px;"':''}>${tpl.name}</a>
			</c:otherwise></c:choose>
		</p>
		</div>
		<div style="clear:both;"></div>
	</div>
	</c:if> 
</c:forEach>