Revision: 29435
Author:   wko
Date:     2011-08-09 00:34:36 +0200 (Tue, 09 Aug 2011)
Log Message:
-----------
GOGREEN-637: Checking emptiness of sitemenuitem's hstLink, which can be null if 
sitemapitem path or refid is not set.

Modified Paths:
--------------
    
hippo-demos/hippo-go-green/branches/hippogogreen-3.03.xx/site/src/main/webapp/WEB-INF/jsp/standard/header/mainnavigation.jsp

Modified: 
hippo-demos/hippo-go-green/branches/hippogogreen-3.03.xx/site/src/main/webapp/WEB-INF/jsp/standard/header/mainnavigation.jsp
===================================================================
--- 
hippo-demos/hippo-go-green/branches/hippogogreen-3.03.xx/site/src/main/webapp/WEB-INF/jsp/standard/header/mainnavigation.jsp
        2011-08-08 22:22:35 UTC (rev 29434)
+++ 
hippo-demos/hippo-go-green/branches/hippogogreen-3.03.xx/site/src/main/webapp/WEB-INF/jsp/standard/header/mainnavigation.jsp
        2011-08-08 22:34:36 UTC (rev 29435)
@@ -22,19 +22,22 @@
 <!-- main navigation -->
 <ul id="main-nav">
     <c:forEach var="item" items="${menu.siteMenuItems}">
-        <hst:link var="link" link="${item.hstLink}"/>
-        <c:choose >
-                <c:when test="${item.expanded}">
-                    <li class="active">
-                       <a href="${fn:escapeXml(link)}"><c:out 
value="${item.name}"/></a>
-                    </li>
-                </c:when>
-                <c:otherwise>
-                    <li>
-                       <a href="${fn:escapeXml(link)}"><c:out 
value="${item.name}"/></a>
-                    </li>
-                </c:otherwise>
-            </c:choose>
+        <c:set var="itemLink" value="${item.hstLink}" />
+        <c:if test="${not empty itemLink}">
+            <hst:link var="link" link="${itemLink}"/>
+            <c:choose >
+                    <c:when test="${item.expanded}">
+                        <li class="active">
+                           <a href="${fn:escapeXml(link)}"><c:out 
value="${item.name}"/></a>
+                        </li>
+                    </c:when>
+                    <c:otherwise>
+                        <li>
+                           <a href="${fn:escapeXml(link)}"><c:out 
value="${item.name}"/></a>
+                        </li>
+                    </c:otherwise>
+                </c:choose>
+        </c:if>
     </c:forEach>
 </ul>
     
\ No newline at end of file

_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.hippocms.org
http://lists.hippo.nl/mailman/listinfo/hippocms-svn

Reply via email to