Skip to content

Instantly share code, notes, and snippets.

@jdsimcoe
Created August 22, 2012 18:46
Show Gist options
  • Save jdsimcoe/3428271 to your computer and use it in GitHub Desktop.
Save jdsimcoe/3428271 to your computer and use it in GitHub Desktop.
Subnav
<xsl:template name="template-header-inside-container">
<xsl:variable name="parent" select="//tags-all-entries/entry[@id = $pt1]/parent/item/@id" />
<xsl:if test="$pt1 and not($pt1 = //tags-all-entries/entry[tag/@handle = 'home']/@id)">
<div class="jumbotron masthead" id="overview">
<div class="subnav">
<xsl:for-each select="//tags-all-entries/entry[@id = $pt1]/parent/item/@id">
<xsl:call-template name="nav-tier" />
</xsl:for-each>
<xsl:call-template name="subnav-group">
<xsl:with-param name="group" select="//tags-all-entries/entry[parent/item/@id = $pt1 and not(hide-from-header = 'Yes')]" />
</xsl:call-template>
</div>
</div>
</xsl:if>
</xsl:template>
<xsl:template name="nav-tier">
<xsl:variable name="node" select="." />
<xsl:for-each select="//tags-all-entries/entry[@id = $node]/parent/item/@id">
<xsl:call-template name="nav-tier" />
</xsl:for-each>
<xsl:call-template name="subnav-group">
<xsl:with-param name="group" select="//tags-all-entries/entry[parent/item/@id = $node and not(hide-from-header = 'Yes')]" />
</xsl:call-template>
</xsl:template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment