Add better navigation links at the bottom of the events pages for
previous years.
This commit is contained in:
parent
4df127e44e
commit
61d2334caf
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=33429
2 changed files with 43 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
# $FreeBSD: www/en/events/Makefile,v 1.15 2008/06/22 23:18:55 murray Exp $
|
||||
# $FreeBSD: www/en/events/Makefile,v 1.16 2008/12/15 02:38:22 murray Exp $
|
||||
|
||||
.if exists(../Makefile.conf)
|
||||
.include "../Makefile.conf"
|
||||
|
@ -26,6 +26,7 @@ DEPENDSET.events= events
|
|||
.for year in ${PASTYEARS}
|
||||
XMLDOCS+= events${year}:${XSL_EVENTS_PAST}:${XML_EVENTS_EVENTS}:
|
||||
PARAMS.events${year}= --param year ${year}
|
||||
PARAMS.events${year}+= --stringparam pastyears '${PASTYEARS}'
|
||||
DEPENDSET.events${year}= events${year}
|
||||
.endfor
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<!ENTITY % header.rss "INCLUDE">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD: www/share/sgml/templates.pastevents.xsl,v 1.1 2008/06/22 23:10:47 murray Exp $ -->
|
||||
<!-- $FreeBSD: www/share/sgml/templates.pastevents.xsl,v 1.2 2008/06/23 07:08:02 murray Exp $ -->
|
||||
|
||||
<!-- Copyright (c) 2003 Simon L. Nielsen <simon@FreeBSD.org>
|
||||
Copyright (c) 2008 Murray M Stokely <murray@FreeBSD.org>
|
||||
|
@ -53,6 +53,8 @@
|
|||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
|
||||
|
||||
<xsl:param name="pastyears">2003 2004 2005 2006</xsl:param>
|
||||
|
||||
<xsl:key name="event-by-month" match="event"
|
||||
use="concat(startdate/year, format-number(startdate/month, '00'))"/>
|
||||
|
||||
|
@ -168,6 +170,18 @@
|
|||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:for-each>
|
||||
|
||||
<p><a href="events.html">Current Events</a></p>
|
||||
|
||||
<p>Events from past years:</p>
|
||||
|
||||
<ul id="events-past-years">
|
||||
<xsl:call-template name="split-string">
|
||||
<xsl:with-param name="seperator" select="' '"/>
|
||||
<xsl:with-param name="text" select="$pastyears"/>
|
||||
</xsl:call-template>
|
||||
</ul>
|
||||
|
||||
</div> <!-- contentwrap -->
|
||||
|
||||
<br class="clearboth" />
|
||||
|
@ -267,4 +281,30 @@ upcoming</a></p>
|
|||
<xsl:value-of select="../name"/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="split-string">
|
||||
<xsl:param name="seperator"/>
|
||||
<xsl:param name="text"/>
|
||||
<xsl:variable name="first" select="substring-before($text, $seperator)"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$first or substring-after($text,$seperator)">
|
||||
<xsl:if test="$first">
|
||||
<li><a>
|
||||
<xsl:attribute name="href">events<xsl:value-of select="$first"/>.html</xsl:attribute>
|
||||
<xsl:value-of select="$first" />
|
||||
</a></li>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="split-string">
|
||||
<xsl:with-param name="text" select="substring-after($text,$seperator)"/>
|
||||
<xsl:with-param name="seperator" select="$seperator"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<li><a>
|
||||
<xsl:attribute name="href">events<xsl:value-of select="$text"/>.html</xsl:attribute>
|
||||
<xsl:value-of select="$text" />
|
||||
</a></li>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
|
Loading…
Reference in a new issue