You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by fe...@apache.org on 2005/11/25 06:47:09 UTC
svn commit: r348883 -
/forrest/trunk/main/webapp/skins/pelt/xslt/html/book-to-menu.xsl
Author: ferdinand
Date: Thu Nov 24 21:47:00 2005
New Revision: 348883
URL: http://svn.apache.org/viewcvs?rev=348883&view=rev
Log:
Adding new skin 'scales' with features for large sites.
Modified:
forrest/trunk/main/webapp/skins/pelt/xslt/html/book-to-menu.xsl
Modified: forrest/trunk/main/webapp/skins/pelt/xslt/html/book-to-menu.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/skins/pelt/xslt/html/book-to-menu.xsl?rev=348883&r1=348882&r2=348883&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/pelt/xslt/html/book-to-menu.xsl (original)
+++ forrest/trunk/main/webapp/skins/pelt/xslt/html/book-to-menu.xsl Thu Nov 24 21:47:00 2005
@@ -42,6 +42,43 @@
</xsl:template>
<xsl:template match="menu-item[@type='hidden']"/>
+
+
+ <!--
+ FSO
+ Show menu-items of this type only when the referenced page
+ is currently open.
+ Added to maintain context without having to show all pages always on the menu.
+ -->
+ <xsl:template match="menu-item[@type='showWhenSelected']">
+
+ <!-- Use apply-imports when overriding -->
+ <xsl:variable name="href-nofrag">
+ <xsl:call-template name="path-nofrag">
+ <xsl:with-param name="path" select="@href" />
+ </xsl:call-template>
+ </xsl:variable>
+ <!-- Compare with extensions stripped -->
+ <xsl:variable name="node-path">
+ <xsl:call-template name="normalize">
+ <xsl:with-param name="path" select="concat($dirname, $href-nofrag)" />
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="$node-path = $path-nofrag">
+
+ <li>
+ <xsl:choose>
+ <xsl:when test="contains(@href, '#')">
+ <xsl:call-template name="selected-anchor" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="selected" />
+ </xsl:otherwise>
+ </xsl:choose></li>
+
+ </xsl:if>
+
+ </xsl:template>
<xsl:template match="menu-item">
<li>