New tag for Foundry which shows the current main category (the one directly below the root category)

git-svn-id: https://svn.libreccm.org/ccm/trunk@3102 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2015-01-23 08:47:15 +00:00
parent a255c084d3
commit 35cd863e45
1 changed files with 11 additions and 0 deletions

View File

@ -128,6 +128,17 @@
</xsl:template>
<xsl:template match="breadcrumbs-current-main-category">
<xsl:choose>
<xsl:when test="count($data-tree//nav:categoryPath/nav:category[position() &gt; 1])">
<xsl:value-of select="$data-tree//nav:categoryPath/nav:category[position() = 2]/@title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$data-tree//nav:categoryPath/nav:category[position() = 1]/@title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="breadcrumbs-current-category">
<xsl:value-of select="$data-tree//nav:categoryPath/nav:category[position() = last()]/@title"/>
</xsl:template>