hook(type => "getsetup", id => "map", call => \&getsetup);
hook(type => "preprocess", id => "map", call => \&preprocess);
hook(type => "getsetup", id => "map", call => \&getsetup);
hook(type => "preprocess", id => "map", call => \&preprocess);
my $map = "<div class='map'>\n<ul>\n";
foreach my $item (sort keys %mapitems) {
my @linktext = (length $mapitems{$item} ? (linktext => $mapitems{$item}) : ());
my $map = "<div class='map'>\n<ul>\n";
foreach my $item (sort keys %mapitems) {
my @linktext = (length $mapitems{$item} ? (linktext => $mapitems{$item}) : ());
if defined $common_prefix && length $common_prefix;
my $depth = ($item =~ tr/\//\//) + 1;
my $baseitem=IkiWiki::dirname($item);
if defined $common_prefix && length $common_prefix;
my $depth = ($item =~ tr/\//\//) + 1;
my $baseitem=IkiWiki::dirname($item);
while (length $parent && length $baseitem && $baseitem !~ /^\Q$parent\E(\/|$)/) {
$parent=IkiWiki::dirname($parent);
while (length $parent && length $baseitem && $baseitem !~ /^\Q$parent\E(\/|$)/) {
$parent=IkiWiki::dirname($parent);
$map .= "<li>"
.htmllink($params{page}, $params{destpage},
"/".$common_prefix.$p, class => "mapparent",
noimageinline => 1)
."\n";
$openli=1;
$map .= "<li>"
.htmllink($params{page}, $params{destpage},
"/".$common_prefix.$p, class => "mapparent",
noimageinline => 1)
."\n";
$openli=1;