summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/edittemplate.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm
index 7d2eba194..e8e7b1e04 100644
--- a/IkiWiki/Plugin/edittemplate.pm
+++ b/IkiWiki/Plugin/edittemplate.pm
@@ -55,7 +55,8 @@ sub preprocess (@) {
}
my $link=linkpage($params{template});
- $pagestate{$params{page}}{edittemplate}{$params{match}}=$link;
+ my $bestlink=bestlink($params{page}, $link);
+ $pagestate{$params{page}}{edittemplate}{$params{match}}=$bestlink;
return "" if ($params{silent} && IkiWiki::yesno($params{silent}));
add_depends($params{page}, $link, deptype("presence"));