5 include( '/elements/menubar.html',
7 #options hashref (optional)
8 { 'newstyle' => 1, #may become the default at some point
9 'url_base' => '', #prepended to menubar URLs, for convenience
10 'selected' => '', #currently selected label
13 #menubar entries (required)
21 %if ( $opt->{'newstyle'} ) {
24 <% join('', @html ) %>
29 <% join(' | ', @html) %>
34 my $opt = ref($_[0]) ? shift : {};
36 my $url_base = $opt->{'url_base'};
41 my ($item, $url) = splice(@_,0,2);
42 next if $item =~ /^\s*Main\s+Menu\s*$/i;
45 if ( $opt->{'newstyle'} ) {
47 my $dclass = $item eq $opt->{'selected'}
51 $style = qq( CLASS="$dclass" );
55 push @html, qq!<A HREF="$url_base$url" $style>$item</A>!;