X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9f401d6617a11efcedda1c956b2ccea061a7540f..7a016ad4185eb9059add6eef1ffe2f9ff09ea684:/IkiWiki/Plugin/parentlinks.pm?ds=sidebyside

diff --git a/IkiWiki/Plugin/parentlinks.pm b/IkiWiki/Plugin/parentlinks.pm
index 432613ddf..9f16dd082 100644
--- a/IkiWiki/Plugin/parentlinks.pm
+++ b/IkiWiki/Plugin/parentlinks.pm
@@ -9,6 +9,7 @@ use IkiWiki 3.00;
 sub import {
 	hook(type => "parentlinks", id => "parentlinks", call => \&parentlinks);
 	hook(type => "pagetemplate", id => "parentlinks", call => \&pagetemplate);
+	hook(type => "getsetup", id => "parentlinks", call => \&getsetup);
 }
 
 sub getsetup () {
@@ -26,7 +27,7 @@ sub parentlinks ($) {
 	if (! length $page) {
 		# dynamic page
 		return {
-			url => $config{url},
+			url => IkiWiki::baseurl(undef),
 			page => $config{wikiname},
 		};
 	}
@@ -64,7 +65,7 @@ sub pagetemplate (@) {
         my $template=$params{template};
 
 	if ($template->query(name => "parentlinks") ||
- 	   $template->query(name => "has_parentlinks")) {
+	    $template->query(name => "has_parentlinks")) {
 		my @links=parentlinks($params{page});
 		$template->param(parentlinks => \@links);
 		$template->param(has_parentlinks => (@links > 0));