]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/trail.pm
Forum: Ask about strange link appearance with trail and actiontabs
[git.ikiwiki.info.git] / IkiWiki / Plugin / trail.pm
index b1bb6d5b532fb25120f6da1d4a371e43e04cfb72..d5fb2b5d624c1b21cf0fa9163b5b223a090e917e 100644 (file)
@@ -344,8 +344,6 @@ sub prerender {
                        $prev = $members->[$i - 1] if $i > 0;
                        my $next = $members->[$i + 1];
 
-                       add_depends($member, $trail, deptype("presence"));
-
                        $member_to_trails{$member}{$trail} = [$prev, $next];
                }
 
@@ -413,6 +411,8 @@ sub pagetemplate (@) {
        my $page = $params{page};
        my $template = $params{template};
 
+       return unless length $page;
+
        if ($template->query(name => 'trails') && ! $recursive) {
                prerender();
 
@@ -438,13 +438,11 @@ sub pagetemplate (@) {
                        my ($prevurl, $nexturl, $prevtitle, $nexttitle);
 
                        if (defined $prev) {
-                               add_depends($params{destpage}, $prev, deptype("presence"));
                                $prevurl = urlto($prev, $page);
                                $prevtitle = title_of($prev);
                        }
 
                        if (defined $next) {
-                               add_depends($params{destpage}, $next, deptype("presence"));
                                $nexturl = urlto($next, $page);
                                $nexttitle = title_of($next);
                        }