%@ sitemap/functions.pl %> <%@ lib/stdlib.pl %> <%@ lib/browser.pl %> <% my $parent_document = $document; %> <% my $parent_align = $parent_document->Align; my $menu_align = ($parent_align eq 'left') ? 'right' : 'left'; %> <%-- This is the tricky bit in this template: because sitemap has got a tree structure, it needs to be processed recursively (well, could use a stack...) --%> <% sub print_recurse { my $document = shift; my $document_URI = $document->URI; my $document_Title = $document->Title; my @children = $document->Children; if (not defined $document->{Parent_ID}) { print_root ($document, @children); } elsif (@children) { if (sitemap_is_expanded ($document)) { print_expanded ($document, @children); } else { print_folded ($document); } } else { print_leaf ($document); } } %> <% sub print_leaf { my $document = shift; %>
MKDoc |
|
[[Sitemap]][[You can expand and fold branches of the sitemap by using the plus [+] and minus [-] links.]]
|