From 66cc23a591f25344072deb07b2ccc7a4d4c89047 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 5 May 2010 18:22:47 -0400 Subject: no more misc.tmpl * Removed misc.tmpl. Now to theme ikiwiki, you only need to customise a single template, page.tmpl. * misc.tmpl will, however, still be read if a locally modified version exists. This is to avoid forcing users to update page.tmpl right now. --- IkiWiki.pm | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index c428de77f..d20a3709c 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1742,21 +1742,29 @@ sub template ($;@) { sub misctemplate ($$;@) { my $title=shift; - my $pagebody=shift; + my $content=shift; - my $template=template("misc.tmpl"); + my $template=template("misc.tmpl") || template("page.tmpl"); + + run_hooks(pagetemplate => sub { + shift->(page => "", destpage => "", template => $template); + }); + $template->param( title => $title, - indexlink => indexlink(), wikiname => $config{wikiname}, - pagebody => $pagebody, + content => $content, baseurl => baseurl(), html5 => $config{html5}, + have_actions => 0, # force off + searchform => 0, # ditto + parentlinks => [{ # override + url => $config{url}, + page => $config{wikiname}, + }], @_, ); - run_hooks(pagetemplate => sub { - shift->(page => "", destpage => "", template => $template); - }); + return $template->output; } -- cgit v1.2.3