Make single-page link in the top section be a relative link.
authorCameron McCormack <cam@mcc.id.au>
Wed, 09 May 2012 20:55:07 +0200
changeset 12 7ab313269006
parent 11 3ae18dca9e21
child 13 08efacece0d5
Make single-page link in the top section be a relative link.
publish.xsl
--- a/publish.xsl	Wed May 09 20:46:45 2012 +0200
+++ b/publish.xsl	Wed May 09 20:55:07 2012 +0200
@@ -1252,17 +1252,8 @@
   </xsl:template>
 
   <xsl:template match='edit:thisversion'>
-    <xsl:variable name='url'>
-      <xsl:choose>
-        <xsl:when test='@single-page != ""'>
-          <xsl:value-of select='$this-version-single'/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select='$this-version'/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <a href='{$url}' class='url'><xsl:value-of select='$url'/></a>
+    <xsl:variable name='url' select='if (@single-page = "") then $this-version else $this-version-single'/>
+    <a href='{if (@single-page != "") then "single-page.html" else $url}' class='url'><xsl:value-of select='$url'/></a>
   </xsl:template>
 
   <xsl:template match='edit:latestversion'>