<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/taglib.jsp"%>
<div id="menu">
<ul>
<li <c:if test="${selected=='index'}">class=selected</c:if>><a href="<c:url value="/"/>">首页</a></li>
	<c:forEach var="page" items="${pages}">
	<c:choose>
		<c:when test="${page.key!=null}">
			<c:set var="url" value="/pages.do?method=page&key=${page.key}" />
		</c:when>
		<c:otherwise>
			<c:set var="url" value="/pages.do?method=page&id=${page.id}" />
		</c:otherwise>
	</c:choose>
	<c:set var="id"><c:out value="${page.id}"/></c:set>
	<li <c:if test="${selected==id}">class=selected</c:if>><a href="<c:url value="${url}"/>"><c:out value="${page.title}" /></a></li>
	</c:forEach>
</ul>
</div>
</div>