theme: Now <TMPL_IF THEME_$NAME> can be used in all templates when a theme is enabled.
parent
9addf2b57e
commit
67ebaf15d7
|
@ -9,6 +9,7 @@ sub import {
|
||||||
hook(type => "getsetup", id => "theme", call => \&getsetup);
|
hook(type => "getsetup", id => "theme", call => \&getsetup);
|
||||||
hook(type => "checkconfig", id => "theme", call => \&checkconfig);
|
hook(type => "checkconfig", id => "theme", call => \&checkconfig);
|
||||||
hook(type => "needsbuild", id => "theme", call => \&needsbuild);
|
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
|
||||||
|
|
|
@ -2,6 +2,8 @@ ikiwiki (3.20130505) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* Fix test suite to not fail when XML::Twig is not installed.
|
* Fix test suite to not fail when XML::Twig is not installed.
|
||||||
Closes: #707436
|
Closes: #707436
|
||||||
|
* theme: Now <TMPL_IF THEME_$NAME> can be used in all templates when
|
||||||
|
a theme is enabled.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Thu, 09 May 2013 10:47:18 -0400
|
-- Joey Hess <joeyh@debian.org> Thu, 09 May 2013 10:47:18 -0400
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue