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;
}
+ikiwiki (3.20100505) UNRELEASED; urgency=low
+
+ * 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.
+
+ -- Joey Hess <joeyh@debian.org> Wed, 05 May 2010 18:07:29 -0400
+
ikiwiki (3.20100504) unstable; urgency=low
* Add parameter to displaytime to specify that it is a pubdate,
* Enable tagbase by default (so that tag autocreation will work by default).
Note that this is already done for wikis created by `auto-blog.setup`.
* [[tips/html5]] on by default (some day..)
+* stop reading misc.tmpl if it exists (only done in case users have a customized
+ version, or an outdated version of page.tmpl that cannot be used by
+ misctemplate)
In general, we try to use [[ikiwiki-transition]] or forced rebuilds on
upgrade to deal with changes that break compatability. Some things that
key template to customize. [[!if test="enabled(pagetemplate)" then="""
(The pagetemplate directive can be used to make a page use a
different template than `page.tmpl`.)"""]]
-* `misc.tmpl` - Generic template used for any page that doesn't
- have a custom template.
* `rsspage.tmpl` - Used for generating rss feeds for blogs.
* `rssitem.tmpl` - Used for generating individual items on rss feeds.
* `atompage.tmpl` - Used for generating atom feeds for blogs.