summaryrefslogtreecommitdiff
path: root/help3xsl/online_transform.xsl
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2018-01-29 15:00:51 -0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2018-01-29 18:10:40 +0100
commit64187c4328623fca6c00d2f5c9f659211ee18883 (patch)
tree78c6b5a9f92cb57b285a752a8b04ca656727538d /help3xsl/online_transform.xsl
parentc2ef507d3275257c83558c794b3ebb1385f8a4fa (diff)
New Help: allow product version = "latest"
To enhance version migration, the most recent Help will be named "latest" in the URL. Explicit last version X.Y will be symbolic link to 'latest'. e.g. '6.0' -> 'latest' *This will allow search engine to always index the same 'latest' URL *External links always land in 'latest' pages. Change-Id: I5ffa1d268f71b7ebe75d5d90c62bcd6304507602 Reviewed-on: https://gerrit.libreoffice.org/48848 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/online_transform.xsl')
-rw-r--r--help3xsl/online_transform.xsl19
1 files changed, 15 insertions, 4 deletions
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index acdc6febb3..00d8d69e6c 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -116,7 +116,13 @@
<xsl:with-param name="str" select="$filename"/>
</xsl:call-template>
</xsl:variable>
-<html lang="{$lang}">
+ <xsl:variable name="logoprodversion">
+ <xsl:choose>
+ <xsl:when test="$productversion='latest'"><xsl:value-of select="''"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="$productversion"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+<html lang="{$lang}">
<head>
<base href="{$install}"/>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
@@ -144,9 +150,14 @@
<div class="logo-container">
<a class="logo" href="https://helponline.libreoffice.org/">
<div class="symbol"></div>
- <p><xsl:call-template name="brand"><xsl:with-param name="string">
- <xsl:call-template name="getLogo"><xsl:with-param name="lang" select="$lang"/><xsl:with-param name="version" select="$productversion"/></xsl:call-template>
- </xsl:with-param></xsl:call-template></p>
+ <p><xsl:call-template name="brand">
+ <xsl:with-param name="string">
+ <xsl:call-template name="getLogo">
+ <xsl:with-param name="lang" select="$lang"/>
+ <xsl:with-param name="version" select="$logoprodversion"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template></p>
</a>
</div>
</header>