]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/theme.pm
Provide a UUID in edittemplate templates.
[ikiwiki.git] / IkiWiki / Plugin / theme.pm
index 03b0816ed6fc5a6c42f0da916d898c6633eb7d15..9b84ea7f023d10c6db947f136adb4ed8b8ec72e0 100644 (file)
@@ -9,6 +9,7 @@ sub import {
        hook(type => "getsetup", id => "theme", call => \&getsetup);
        hook(type => "checkconfig", id => "theme", call => \&checkconfig);
        hook(type => "needsbuild", id => "theme", call => \&needsbuild);
+       hook(type => "pagetemplate", id => "theme", call => \&pagetemplate);
 }
 
 sub getsetup () {
@@ -60,6 +61,15 @@ sub needsbuild ($) {
                
                $wikistate{theme}{currenttheme}=$config{theme};
        }
+       return $needsbuild;
+}
+
+sub pagetemplate (@) {
+       my %params=@_;
+       my $template=$params{template};
+       if (exists $config{theme} && length $config{theme})  {
+               $template->param("theme_$config{theme}" => 1);
+       }
 }
 
 1