summaryrefslogtreecommitdiff
path: root/xsl/navi.xsl
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-08-23 16:02:34 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-08-23 16:06:05 +0200
commitf9c9aef63c24188c87dbe4a351b2834e2fc0d282 (patch)
tree2557ec019bb4f2833b86481ccb36ede366946086 /xsl/navi.xsl
downloadmutti-web-f9c9aef63c24188c87dbe4a351b2834e2fc0d282.tar.gz
mutti-web-f9c9aef63c24188c87dbe4a351b2834e2fc0d282.tar.bz2
mutti-web-f9c9aef63c24188c87dbe4a351b2834e2fc0d282.zip
Add initial layout + pages
Diffstat (limited to 'xsl/navi.xsl')
-rw-r--r--xsl/navi.xsl32
1 files changed, 32 insertions, 0 deletions
diff --git a/xsl/navi.xsl b/xsl/navi.xsl
new file mode 100644
index 0000000..1130def
--- /dev/null
+++ b/xsl/navi.xsl
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="https://beratung-franzke.de/web-tpl">
+
+ <xsl:template name="navigation">
+ <xsl:variable name="file" select="concat(substring-before(/s:html/@name, '.xml'), $suffix)" />
+
+ <xsl:for-each select="document('../main.xml')/s:site/s:page">
+ <xsl:variable name="url" select="concat(substring-before(@filename, '.xml'), $suffix)"/>
+ <xsl:variable name="i">
+ <xsl:number />
+ </xsl:variable>
+ <xsl:if test="not(@visibility='hidden')">
+ <li>
+ <a href="{concat($url, @anchor)}">
+ <xsl:if test="$url = $file">
+ <xsl:attribute name="class">
+ <xsl:value-of select="'active'" />
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="accesskey">
+ <xsl:value-of select="$i" />
+ </xsl:attribute>
+ <xsl:value-of select="@title" />
+ </a>
+ </li>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>