On 2020-06-21 09:19, Fabien COELHO wrote:
I've been annoyed that the documentation navigation does not always has an
"Up" link. It has them inside parts, but the link disappears and you have
to go for the "Home" link which is far on the right when on the root page
of a part?

Is there a good reason not to have the "Up" link there as well?

The original stylesheets explicitly go out of their way to do it that way. We can easily fix that by removing that special case. See attached patch.

That patch only fixes it for the header. To fix it for the footer as well, we'd first need to import the navfooter template to be able to customize it. Not a big problem though.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From fd256cfd4bc59daa2520083eca7ee3ca83991bfd Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Fri, 3 Jul 2020 10:56:48 +0200
Subject: [PATCH] doc: Don't hide the "Up" link when it is the same as "Home"

Reported-by: Fabien COELHO <coe...@cri.ensmp.fr>
Discussion: 
https://www.postgresql.org/message-id/flat/alpine.DEB.2.22.394.2006210914370.859381%40pseudo
---
 doc/src/sgml/stylesheet.xsl | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/doc/src/sgml/stylesheet.xsl b/doc/src/sgml/stylesheet.xsl
index aeaa1e7c10..af0ac129e9 100644
--- a/doc/src/sgml/stylesheet.xsl
+++ b/doc/src/sgml/stylesheet.xsl
@@ -57,7 +57,6 @@ Customization of header
   <xsl:variable name="row1" select="$navig.showtitles != 0"/>
   <xsl:variable name="row2" select="count($prev) &gt; 0
                                     or (count($up) &gt; 0
-                                        and generate-id($up) != 
generate-id($home)
                                         and $navig.showtitles != 0)
                                     or count($next) &gt; 0"/>
 
@@ -95,8 +94,7 @@ Customization of header
               </td>
               <td width="10%" align="{$direction.align.start}">
                 <xsl:choose>
-                  <xsl:when test="count($up)&gt;0
-                                  and generate-id($up) != generate-id($home)">
+                  <xsl:when test="count($up)&gt;0">
                     <a accesskey="u">
                       <xsl:attribute name="href">
                         <xsl:call-template name="href.target">
@@ -117,7 +115,6 @@ Customization of header
               <th width="60%" align="center">
                 <xsl:choose>
                   <xsl:when test="count($up) > 0
-                                  and generate-id($up) != generate-id($home)
                                   and $navig.showtitles != 0">
                     <xsl:apply-templates select="$up" 
mode="object.title.markup"/>
                   </xsl:when>
-- 
2.27.0

Reply via email to