my @menubar = (
{title =>'home',
width =>'10',
height =>'9',
param =>'home',
alt =>'Return to the front page'},
{title =>'donate',
width =>'15',
height =>'9',
param =>'donate',
alt =>'Send a donation to help'},
# {...} and so on, 9 menu options
);
$cgi->start_div({-id=>'mline'}),
$cgi->end_div(),
"\n\n",
$cgi->start_div({-id=>'tmbox'});
print join " | ", map {
$cgi->span({-class => 'mitem'},
$cgi->a({-href => "$script?a=$_->{param}",
-title => "$_->{alt}"},
$cgi->img({-src => "i/$_->{param}.png",
-border => '0',
-width => "$_->{width}",
-height => "$_->{height}",
-alt => "($_->{alt})"}),
" $_->{title} "),),}
@menubar;
print $cgi->end_div();
####
my $template = HTML::Template->new(
filename => 'menubar.tmpl');
$template->param(MENUBAR => [
{title =>'home',
width =>'10',
height =>'9',
param =>'home',
alt =>'Return to the front page'},
{title =>'donate',
width =>'15',
height =>'9',
param =>'donate',
alt =>'Send a donation to help'},
# {...} and so on, 9 menu options
]
);
print $template->output();
# Yes, still using CGI.pm here for right now
$cgi->start_div({-id=>'mline'}),
$cgi->end_div(),
"\n\n",
$cgi->start_div({-id=>'tmbox'});
####