]> sipb.mit.edu Git - ikiwiki.git/commitdiff
no more misc.tmpl
authorJoey Hess <joey@kitenet.net>
Wed, 5 May 2010 22:22:47 +0000 (18:22 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 5 May 2010 22:22:47 +0000 (18:22 -0400)
* 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
debian/changelog
doc/roadmap.mdwn
doc/templates.mdwn

index c428de77f7e055390e66fcdf53301f61ac2d9382..d20a3709c9a9a4c911e0a0dfce6025e7de0e8f97 100644 (file)
@@ -1742,21 +1742,29 @@ sub template ($;@) {
 
 sub misctemplate ($$;@) {
        my $title=shift;
 
 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,
        $template->param(
                title => $title,
-               indexlink => indexlink(),
                wikiname => $config{wikiname},
                wikiname => $config{wikiname},
-               pagebody => $pagebody,
+               content => $content,
                baseurl => baseurl(),
                html5 => $config{html5},
                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;
 }
 
        return $template->output;
 }
 
index 43c907544ef3a6f5980d843df148979a475373c6..0c3a99f0e83a82faf1c3ddebad8cfea2b41d6b6d 100644 (file)
@@ -1,3 +1,12 @@
+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,
 ikiwiki (3.20100504) unstable; urgency=low
 
   * Add parameter to displaytime to specify that it is a pubdate,
index e257c21a221b33a2f6014e99d7b59dcb863bc8b6..729d22fb87483e44de1d2f94acf5cd26ecffe08f 100644 (file)
@@ -81,6 +81,9 @@ Probably incomplete list:
 * 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..)
 * 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
 
 In general, we try to use [[ikiwiki-transition]] or forced rebuilds on
 upgrade to deal with changes that break compatability. Some things that
index 9208db0ebf49ad2adf06b503b7de886cb007fb7e..2444cf14d42acc88cd28a44772d7adc6358cf491 100644 (file)
@@ -45,8 +45,6 @@ html out of ikiwiki and in the templates.
   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`.)"""]]
   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.
 * `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.