svn commit: r595176 - /lenya/trunk/src/webapp/lenya/xslt/menu/menubar2xhtml.xsl

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Wed Nov 14 17:29:01 2007
New Revision: 595176

URL: http://svn.apache.org/viewvc?rev=595176&view=rev
Log:
Disable empty menus

Modified:
    lenya/trunk/src/webapp/lenya/xslt/menu/menubar2xhtml.xsl

Modified: lenya/trunk/src/webapp/lenya/xslt/menu/menubar2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/menu/menubar2xhtml.xsl?rev=595176&r1=595175&r2=595176&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/menu/menubar2xhtml.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/menu/menubar2xhtml.xsl Wed Nov 14 17:29:01 2007
@@ -215,7 +215,16 @@
   -->
   
   <xsl:template match="menu:menu" mode="nav">
-    <li id="nav{position()}"><i18n:text><xsl:value-of select="@name"/></i18n:text>
+    <li>
+      <xsl:choose>
+        <xsl:when test="*">
+          <xsl:attribute name="id">nav<xsl:value-of select="position()"/></xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="class">disabled</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      <i18n:text><xsl:value-of select="@name"/></i18n:text>
       <xsl:if test="*">
         <ul id="menu{position()}">
           <xsl:apply-templates select="menu:block"/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.