]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/theme.pm
Merge branch 'master' into debian-jessie-backports
[git.ikiwiki.info.git] / IkiWiki / Plugin / theme.pm
index ee94547e90c51dad608b020e1be6bc0a434d38d7..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 => "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 () {
 }
 
 sub getsetup () {
@@ -63,4 +64,12 @@ sub needsbuild ($) {
        return $needsbuild;
 }
 
        return $needsbuild;
 }
 
+sub pagetemplate (@) {
+       my %params=@_;
+       my $template=$params{template};
+       if (exists $config{theme} && length $config{theme})  {
+               $template->param("theme_$config{theme}" => 1);
+       }
+}
+
 1
 1