X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ef003f48f4a3fe8fb67fda62c70a299b07d75976..ad303e878e65c72bf31eb676ced866be56bbee91:/IkiWiki/Plugin/parentlinks.pm

diff --git a/IkiWiki/Plugin/parentlinks.pm b/IkiWiki/Plugin/parentlinks.pm
index 1ee69cbff..e678a057d 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));
 	}
 }