<% $nav_html %> % %# ================================================================= % <%init> my $nav_path = $ENV{WA_URL} . $page->course_directory . '/navigation.wiki'; my $nav_comp = $m->fetch_comp($nav_path); my $nav_wiki = $nav_comp ? $m->scomp($nav_comp) : qq{ }; # This next prefix is a kludge to fix a bug: # a single block isn't wrapped in
..
, # while multiples are. The prefix forces the extra
..
wrap. $nav_wiki =~ s{^[\s|\n]*}{}s; $nav_wiki = "\n" . $nav_wiki; my $nav_html = wiki2html($nav_wiki); % <%doc> $Id: navigation.mhtml 7 2006-01-13 02:21:11Z mahoney $ This component generates the navigation menu. With the default wikiacademia.css style sheet, this shows up along the left margin of the page, something like this: --------------- page ------------------ | |course |----------------- | * home | | * assignments | |----------------- | | -------------------------------- This component loads if present the course's navigation page, which is course_directory/navigation.wiki, and should look something like this. Most of the heavy lifting is done by the "nav" tag in WikiPlugins.pm; check there for more details.