hook(type => "preprocess", id => "pagetemplate", call => \&preprocess);
hook(type => "templatefile", id => "pagetemplate", call => \&templatefile);
} # }}}
hook(type => "preprocess", id => "pagetemplate", call => \&preprocess);
hook(type => "templatefile", id => "pagetemplate", call => \&templatefile);
} # }}}
sub preprocess (@) { #{{{
my %params=@_;
if (! exists $params{template} ||
$params{template} !~ /^[-A-Za-z0-9._+]+$/ ||
! defined IkiWiki::template_file($params{template})) {
sub preprocess (@) { #{{{
my %params=@_;
if (! exists $params{template} ||
$params{template} !~ /^[-A-Za-z0-9._+]+$/ ||
! defined IkiWiki::template_file($params{template})) {