#! /usr/bin/wml <: use strict; :> <: use warnings; :> #use "perl-globals.wmi" #use "links.wmi" #use "versions.wmi" #use "navigation.wmi" # #
<:{ my %navigation; my @keys; while (@navigation) { my $key = shift @navigation; my $val = shift @navigation; push @keys, $key; $navigation{$key} = $val; } for my $key (@keys) { my $page = $WML_SRC_FILENAME; $page =~ s/\.wml//; if ($page ne $key) { if (-e "$(DOCROOT)/$(LANG)/$key.wml") { printf '%s'."\n", $key, $navigation{$key}; } else { printf '%s'."\n", $key, $navigation{$key}; } } else { printf '%s'."\n", $navigation{$key}; } } }:> | <:{ my $page = $WML_SRC_FILENAME; my $numlangs = 0; $page =~ s/\.wml//; for my $dir (@LANGUAGES) { if (-e "$dir/$WML_SRC_FILENAME") { if ($dir eq '$(LANG)') { printf(' ', $dir, $LANGUAGES{$dir}); } else { printf(' ', $page, $dir, $dir, $LANGUAGES{$dir}); }; } else { printf(' '); }; }; }:> |