Signed-off-by: intrigeri <intrigeri@boum.org>
my @ret;
my $path="";
my $title=$config{wikiname};
my @ret;
my $path="";
my $title=$config{wikiname};
my @pagepath=(split("/", $page));
my @pagepath=(split("/", $page));
- my $pageloc=@pagepath - 1;
+ my $pagedepth=@pagepath;
foreach my $dir (@pagepath) {
next if $dir eq 'index';
push @ret, {
foreach my $dir (@pagepath) {
next if $dir eq 'index';
push @ret, {
page => $title,
level => $i,
is_root => ($i eq 0),
page => $title,
level => $i,
is_root => ($i eq 0),
- is_first_child => ($i eq 1),
- is_mother => ($i eq ($pageloc - 1)),
- is_grand_mother => ($i eq ($pageloc - 2))
+ is_second_ancestor => ($i eq 1),
+ is_grand_mother => ($i eq ($pagedepth - 2)),
+ is_mother => ($i eq ($pagedepth - 1)),
- $title=pagetitle($dir);
+ $title=IkiWiki::pagetitle($dir);