Skip to content

Instantly share code, notes, and snippets.

@uniquelau
Last active December 28, 2015 08:19
Show Gist options
  • Save uniquelau/7471026 to your computer and use it in GitHub Desktop.
Save uniquelau/7471026 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:umb="urn:umbraco.library"
exclude-result-prefixes="umb"
>
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
<!-- Laurie, VooDooBytes, 14th November 2013 -->
<xsl:param name="currentPage" />
<xsl:variable name="recursive" select="/macro/recursive" />
<xsl:variable name="propertyAlias" select="/macro/property" />
<xsl:template match="/">
<xsl:apply-templates select="$currentPage[$recursive = 1]/ancestor-or-self::*/*[name() = $propertyAlias]/TextstringArray" mode="array"/>
</xsl:template>
<xsl:template match="values" mode="array">
<li class="{value[3]}">
<a href="{value[2]}" target="_blank" title="{value[1]}">
<xsl:value-of select="value[1]"/>
</a>
</li>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment