- trailpage => $trail,
- trailtitle => title_of($trail),
- trailurl => urlto($trail, $page),
+ );
+
+ # the trail index is added as 'up' page, but only if it's
+ # not a page in the trail itself. This allows the definition of
+ # up-less trails by using e.g. the trailitems directive in one of the
+ # pages of the trail
+ unless ($up_in_trail{$trail}) {
+ $trail_info{trailpage} = $trail;
+ $trail_info{trailtitle} = title_of($trail);
+ $trail_info{trailurl} = urlto($trail, $page);