xsl/common: add support for <link> in navigation.xml

This commit is contained in:
Astro 2024-03-08 00:28:05 +01:00
parent 4cc905bdfc
commit 29a806d825
1 changed files with 21 additions and 0 deletions

View File

@ -528,6 +528,27 @@
</li>
</xsl:template>
<xsl:template mode="navitem" match="link">
<xsl:variable name="href">
<xsl:call-template name="make-href">
<xsl:with-param name="href" select="@href"/>
</xsl:call-template>
</xsl:variable>
<li>
<a href="{$href}">
<xsl:if test="@class">
<xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
</xsl:if>
<xsl:if test="@rel">
<xsl:attribute name="rel"><xsl:value-of select="@rel"/></xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</a>
</li>
</xsl:template>
<xsl:template name="navitems">
<xsl:for-each select="document('../content/navigation.xml')/navigation/group">
<ul>