From: Joey Hess Date: Sun, 27 Sep 2009 21:40:41 +0000 (-0400) Subject: parentlinks: Add has_parentlinks template parameter to allow styling the toplevel... X-Git-Tag: 3.20091009~100 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/2acaa15830760695eb673ddb0b17aed715e97f3c?ds=inline;hp=--cc parentlinks: Add has_parentlinks template parameter to allow styling the toplevel index differently etc. --- 2acaa15830760695eb673ddb0b17aed715e97f3c diff --git a/IkiWiki/Plugin/parentlinks.pm b/IkiWiki/Plugin/parentlinks.pm index 1ee69cbff..b01d76f80 100644 --- a/IkiWiki/Plugin/parentlinks.pm +++ b/IkiWiki/Plugin/parentlinks.pm @@ -55,8 +55,11 @@ sub pagetemplate (@) { 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)); } } diff --git a/debian/changelog b/debian/changelog index d50d31721..2e27d623e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sun, 27 Sep 2009 17:40:03 -0400 + ikiwiki (3.14159265) unstable; urgency=low * Add complete French basewiki and underlays translation from the Debian