Foundry: New tag for creating a link to the current top level category.

git-svn-id: https://svn.libreccm.org/ccm/trunk@3868 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2016-02-17 19:01:08 +00:00
parent 5db265ca92
commit cbe9617ad8
1 changed files with 22 additions and 1 deletions

View File

@ -140,7 +140,28 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="breadcrumbs-current-main-category-link">
<xsl:choose>
<xsl:when test="count($data-tree//nav:categoryPath/nav:category[position() &gt; 1])">
<xsl:apply-templates>
<xsl:with-param name="href"
tunnel="yes"
select="$data-tree//nav:categoryPath/nav:category[position() = 2]/@url"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:if test="foundry:boolean(./@show-root)">
<xsl:apply-templates>
<xsl:with-param name="href"
tunnel="yes"
select="$data-tree//nav:categoryPath/nav:category[position() = 1]/@url"/>
</xsl:apply-templates>
</xsl:if>
</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>