Created
October 10, 2016 14:49
-
-
Save ech01/eb25bc32f7d1989187c025abb5144f1f to your computer and use it in GitHub Desktop.
Sitemap DDR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIV.sitemap UL { | |
float: left; | |
margin: 0; | |
padding: 0 2em 0 0; | |
} | |
DIV.sitemap UL A { | |
font-weight: bold; | |
} | |
DIV.sitemap UL UL { | |
float: none; | |
margin: 0; | |
padding: 1em 0 0 0; | |
} | |
DIV.sitemap UL UL A { | |
font-weight: normal; | |
} | |
DIV.sitemap UL UL UL { | |
margin: 0; | |
padding: 0 0 0 1em; | |
} | |
DIV.sitemap LI { | |
list-style-type: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="html"/> | |
<xsl:param name="CSSClass">row sitemap match-height</xsl:param> | |
<xsl:template match="/*"> | |
<xsl:apply-templates select="root" /> | |
</xsl:template> | |
<xsl:template match="root"> | |
<div class="{$CSSClass}"> | |
<xsl:apply-templates select="node" mode="topLevel" /> | |
</div> | |
<div style="clear:both"></div> | |
</xsl:template> | |
<xsl:template match="node" mode="topLevel"> | |
<div class="col-md-6 col-sm-6"> | |
<ul> | |
<li> | |
<xsl:choose> | |
<xsl:when test="@enabled = 1"> | |
<a href="{@url}"> | |
<xsl:value-of select="@text" /> | |
</a> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:value-of select="@text" /> | |
</xsl:otherwise> | |
</xsl:choose> | |
<xsl:if test="node"> | |
<ul> | |
<xsl:apply-templates select="node" /> | |
</ul> | |
</xsl:if> | |
</li> | |
</ul> | |
</div> | |
</xsl:template> | |
<xsl:template match="node"> | |
<li> | |
<xsl:choose> | |
<xsl:when test="@enabled = 1"> | |
<a href="{@url}"> | |
<xsl:value-of select="@text" /> | |
</a> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:value-of select="@text" /> | |
</xsl:otherwise> | |
</xsl:choose> | |
<xsl:if test="node"> | |
<ul> | |
<xsl:apply-templates select="node" /> | |
</ul> | |
</xsl:if> | |
</li> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is from Risdall.com, purveyors of fine websites.