2 package IkiWiki::Plugin::mirrorlist;
9 hook(type => "getsetup", id => "mirrorlist", call => \&getsetup);
10 hook(type => "pagetemplate", id => "mirrorlist", call => \&pagetemplate);
22 description => "list of mirrors",
28 sub pagetemplate (@) {
30 my $template=$params{template};
32 if ($template->query(name => "extrafooter") &&
33 keys %{$config{mirrorlist}} > 0) {
34 my $value=$template->param("extrafooter");
35 $value.=mirrorlist($params{page});
36 $template->param(extrafooter => $value);
43 (keys %{$config{mirrorlist}} > 1 ? gettext("Mirrors") : gettext("Mirror")).
48 $config{mirrorlist}->{$_}."/".urlto($page, "").
50 } keys %{$config{mirrorlist}}