diff options
Improved article stream title-text template
* returns "Start" for the first page instead of "Page 0"
** this corresponds to the navigation
* changed "Start" navigation link in master template
* i.e. the index page is named "0", server config will have to be changed accordingly
** thought about generating it as "index" directly
** while this is possible using the XPath evaluation functionality of the target meta attribute the lack of a if-statement in XPath 1.0 would require a very ugly workaround (e.g. the answer to http://stackoverflow.com/questions/971067/is-there-an-if-then-else-statement-in-xpath)
Diffstat (limited to 'source')
-rw-r--r-- | source/99_result/stream.xsl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/99_result/stream.xsl b/source/99_result/stream.xsl index 2d28043..603e574 100644 --- a/source/99_result/stream.xsl +++ b/source/99_result/stream.xsl @@ -22,7 +22,14 @@ </xsl:variable> <xsl:template name="title-text"> - <xsl:value-of select="/datasource/page/entry/@index"/> + <xsl:choose> + <xsl:when test="/datasource/page/entry/@index = 0"> + Start + </xsl:when> + <xsl:otherwise> + Page <xsl:value-of select="/datasource/page/entry/@index"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template name="get_article"> |