This template outputs the standard TCC page-bottom navigational links. These links start with a boldfaced term such as “Next” that match the links on the top of the page, followed by a link to the target page using that page's title as the link text. Each link line is wrapped in its own div element, and the entire set of links is wrapped in another div with class="botlinks" to allow CSS markup.
<xsl:template name="tcc.bot.links"> <xsl:param name="prev"/> <xsl:param name="next"/> <xsl:param name="home"/> <div class="botlinks"> |
First comes the “Next” link.
The xsl:if tests to see whether there is a node in the $next variable.
The entire structure is wrapped in a div element with class="bot-next".
The href.target template takes a node as a parameter and returns the URL of the corresponding location in the generated document.
The object.title.markup template extracts the title of the node we're pointing to.
<xsl:if test="count($next) > 0">
<div class="bot-next">
<b>Next: </b>
<a>
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$next"/>
</xsl:call-template>
</xsl:attribute>
<xsl:apply-templates select="$next" mode="object.title.markup"/>
</a>
</div>
</xsl:if>
|
Next comes the “Contents” link, similarly, wrapped in a div with class="bot-contents".
<xsl:if test="$home != .">
<div class="bot-contents">
<b>Contents: </b>
<a>
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$home"/>
</xsl:call-template>
</xsl:attribute>
<xsl:apply-templates select="$home" mode="object.title.markup"/>
</a>
</div>
</xsl:if>
|
The “Previous” link works just like the “Next” link.
<xsl:if test="count($prev) > 0">
<div class="bot-prev">
<b>Previous: </b>
<a>
<xsl:attribute name="href">
<xsl:call-template name="href.target">
<xsl:with-param name="object" select="$prev"/>
</xsl:call-template>
</xsl:attribute>
<xsl:apply-templates select="$prev" mode="object.title.markup"/>
</a>
</div>
</xsl:if>
|
The last two links, “Help” and “Home”, always point to the same places.
<div><b>Help: </b> <a href="http://www.nmt.edu/tcc/help/">Tech
Computer Center: Help System</a></div>
<div><b>Home: </b>
<a href="http://www.nmt.edu/">About New Mexico Tech</a></div>
</div>
</xsl:template>
|