X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e6992480e2e0cf965650f84aa97e01fe0fa71544..9951060f624b69053cff2bba88dab6e0ed8eec10:/IkiWiki/Plugin/parentlinks.pm?ds=sidebyside

diff --git a/IkiWiki/Plugin/parentlinks.pm b/IkiWiki/Plugin/parentlinks.pm
index 1ee69cbff..728bbc399 100644
--- a/IkiWiki/Plugin/parentlinks.pm
+++ b/IkiWiki/Plugin/parentlinks.pm
@@ -16,6 +16,7 @@ sub getsetup () {
 		plugin => {
 			safe => 1,
 			rebuild => 1,
+			section => "core",
 		},
 }
 
@@ -55,8 +56,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));
 	}
 }