pedigree: added DISTANCE loop variable
authorintrigeri <intrigeri@boum.org>
Mon, 14 Jul 2008 12:52:34 +0000 (14:52 +0200)
committerintrigeri <intrigeri@boum.org>
Mon, 14 Jul 2008 12:52:34 +0000 (14:52 +0200)
Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/pedigree.pm

index 1bc9ee14db9c00bd642cadeb941a291e274438ab..f91ea94b484a1ce3bde2966b10878aa593c319f2 100644 (file)
@@ -27,6 +27,7 @@ sub pedigree ($) { #{{{
                            url => urlto($path, $page),
                            page => $title,
                            absdepth => $i,
                            url => urlto($path, $page),
                            page => $title,
                            absdepth => $i,
+                           distance => ($pagedepth - $i),
                            is_root => ($i eq 0),
                            is_second_ancestor => ($i eq 1),
                            is_grand_mother => ($i eq ($pagedepth - 2)),
                            is_root => ($i eq 0),
                            is_second_ancestor => ($i eq 1),
                            is_grand_mother => ($i eq ($pagedepth - 2)),