aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-05 18:22:47 -0400
committerJoey Hess <joey@kitenet.net>2010-05-05 18:22:47 -0400
commit66cc23a591f25344072deb07b2ccc7a4d4c89047 (patch)
treeb87fe3991d32cceaf28206286e12a1c33a234f7e /IkiWiki.pm
parent2a2976f7ff281687b5e69a3963fc9c9fe03ef859 (diff)
downloadikiwiki-66cc23a591f25344072deb07b2ccc7a4d4c89047.tar
ikiwiki-66cc23a591f25344072deb07b2ccc7a4d4c89047.tar.gz
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.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm22
1 files changed, 15 insertions, 7 deletions
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;
}