diff mercurial/templates/monoblue/helptopics.tmpl @ 27580:34c3ea65d6d1

templates: support linking to main help page Currently, the "helptopics" template assumes it is only used as the main index and therefore doesn't hyperlink "help" in the navigation list. Sub-topics will introduce an additional consumer of this template. So teach the template to hyperlink the "help" navigation entry when necessary.
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 30 Dec 2015 17:26:33 -0700
parents d35ff0b0d0da
children 6ca3c54f801b
line wrap: on
line diff
--- a/mercurial/templates/monoblue/helptopics.tmpl	Wed Dec 30 17:01:28 2015 -0700
+++ b/mercurial/templates/monoblue/helptopics.tmpl	Wed Dec 30 17:26:33 2015 -0700
@@ -26,7 +26,10 @@
             <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li>
             <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li>
             <li><a href="{url|urlescape}file{sessionvars%urlparameter}">files</a></li>
-            <li class="current">help</li>
+            {if(subindex,
+              '<li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li>',
+              '<li class="current">help</li>'
+            )}
         </ul>
     </div>