From e96cf38eccd219714140f221090d2e7751fd4ee0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Jun 2010 16:00:12 -0400 Subject: When editing a page, show that page's sidebar. (Thanks, privat) --- IkiWiki.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'IkiWiki.pm') 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; -- cgit v1.2.3