]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
reorg all the pages about rcs backends. Fix all links
[ikiwiki.git] / IkiWiki / Render.pm
index 911e9c273f978d49486c176dc37c71c01ed64c6b..5fd0dea0dc080e6bf2fc301f3b306f997eb2e07b 100644 (file)
@@ -69,7 +69,15 @@ sub genpage ($$$) { #{{{
        my $content=shift;
        my $mtime=shift;
 
-       my $template=template("page.tmpl", blind_cache => 1);
+       my $templatefile;
+       run_hooks(templatefile => sub {
+               return if defined $templatefile;
+               my $file=shift->(page => $page);
+               if (defined $file && defined template_file($file)) {
+                       $templatefile=$file;
+               }
+       });
+       my $template=template(defined $templatefile ? $templatefile : 'page.tmpl', blind_cache => 1);
        my $actions=0;
 
        if (length $config{cgiurl}) {
@@ -343,7 +351,7 @@ sub refresh () { #{{{
        }
        run_hooks(needsbuild => sub { shift->(\@needsbuild) });
 
-       # scan and rendder files
+       # scan and render files
        foreach my $file (@needsbuild) {
                debug(sprintf(gettext("scanning %s"), $file));
                scan($file);