X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/8a6f4a7e50c247c061fd74b535d0f292aca6bda7..f4e2bd9c142d16b99a893b755111090c3d01186f:/IkiWiki/Plugin/theme.pm?ds=sidebyside

diff --git a/IkiWiki/Plugin/theme.pm b/IkiWiki/Plugin/theme.pm
index ee94547e9..9b84ea7f0 100644
--- a/IkiWiki/Plugin/theme.pm
+++ b/IkiWiki/Plugin/theme.pm
@@ -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 () {
@@ -63,4 +64,12 @@ sub 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