]> sipb.mit.edu Git - ikiwiki.git/commitdiff
parentlinks: Add has_parentlinks template parameter to allow styling the toplevel...
authorJoey Hess <joey@gnu.kitenet.net>
Sun, 27 Sep 2009 21:40:41 +0000 (17:40 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Sun, 27 Sep 2009 22:29:16 +0000 (18:29 -0400)
IkiWiki/Plugin/parentlinks.pm
debian/changelog

index 1ee69cbff4901695117e1d335f106d1dcb044367..b01d76f8089ee44e85bed1dc50e564b4e1dcdde3 100644 (file)
@@ -55,8 +55,11 @@ sub pagetemplate (@) {
         my $page=$params{page};
         my $template=$params{template};
 
         my $page=$params{page};
         my $template=$params{template};
 
-       if ($template->query(name => "parentlinks")) {
-               $template->param(parentlinks => [parentlinks($page)]);
+       if ($template->query(name => "parentlinks") ||
+          $template->query(name => "has_parentlinks")) {
+               my @links=[parentlinks($page)];
+               $template->param(parentlinks => \@links);
+               $template->param(has_parentlinks => (@links > 0));
        }
 }
 
        }
 }
 
index d50d31721dc1c3d5d03b429b04da771f23104a06..2e27d623e86663ac43af95ad63e7b1a415b03b39 100644 (file)
@@ -1,3 +1,10 @@
+ikiwiki (3.14159266) UNRELEASED; urgency=low
+
+  * parentlinks: Add has_parentlinks template parameter to allow styling
+    the toplevel index differently etc.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 27 Sep 2009 17:40:03 -0400
+
 ikiwiki (3.14159265) unstable; urgency=low
 
   * Add complete French basewiki and underlays translation from the Debian
 ikiwiki (3.14159265) unstable; urgency=low
 
   * Add complete French basewiki and underlays translation from the Debian