<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" session="true" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:if test="${menu ne null}">
<!-- 타이틀 -->
<div id="title" class="title-area">
	<ul class="page-title">
		<li>
			<c:out value="${menu.name}" /> <span><c:out value="${menu.eng_name}" /></span>

		</li>
	</ul>
</div>

<c:if test="${subMenu ne null && fn:length(subMenu) > 0 }">
	<div class="sub_menu">
		<ul>
			<c:set var="isEnd" value=" |"/>
			<c:set var="current" value="class='current'"/>
			<c:forEach var="sub" items="${subMenu}" varStatus="status">
				<li>
					<c:choose>
						<c:when test="${sub.url_group == 'bbs'}">
							<c:set var="id" value="${fn:split(sub.url, '/')[0]}"/>
							<c:set var="category" value="${fn:split(sub.url, '/')[1]}"/>
							<a <c:if test="${sub.id == menu.id}">${current}</c:if> href="/<c:out value="${sub.url_group}"/>/list.do?id=${id}">${sub.name}</a>
						</c:when>
						<c:otherwise>
							<a <c:if test="${sub.id == menu.id}">${current}</c:if> href="/<c:out value="${sub.url_group}"/><c:out value="${sub.url}"/>">${sub.name}</a>
						</c:otherwise>
					</c:choose>
					<c:if test="${!status.last}">${isEnd}</c:if>
				</li>
			</c:forEach>
		</ul>
	</div>
</c:if>
</c:if>
