aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-06-09 16:00:12 -0400
committerJoey Hess <joey@kitenet.net>2010-06-09 16:00:12 -0400
commite96cf38eccd219714140f221090d2e7751fd4ee0 (patch)
treeeec9569699ea73555f3146b5bae745030fff6358 /IkiWiki.pm
parent2eefd84d0adbcaaaf4aa1c306a1c745fa52f3c9b (diff)
downloadikiwiki-e96cf38eccd219714140f221090d2e7751fd4ee0.tar
ikiwiki-e96cf38eccd219714140f221090d2e7751fd4ee0.tar.gz
When editing a page, show that page's sidebar. (Thanks, privat)
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 27fa4ca17..d2ed99923 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1739,11 +1739,20 @@ sub template ($;@) {
sub misctemplate ($$;@) {
my $title=shift;
my $content=shift;
+ my %params=@_;
my $template=template("page.tmpl");
+ my $page="";
+ if (exists $params{page}) {
+ $page=delete $params{page};
+ }
run_hooks(pagetemplate => sub {
- shift->(page => "", destpage => "", template => $template);
+ shift->(
+ page => $page,
+ destpage => $page,
+ template => $template,
+ );
});
templateactions($template, "");
@@ -1754,7 +1763,7 @@ sub misctemplate ($$;@) {
content => $content,
baseurl => baseurl(),
html5 => $config{html5},
- @_,
+ %params,
);
return $template->output;