From: Shane <sh...@lo...> - 2004-04-06 11:19:02
|
I'm trying to generate menu's on the fly, and I'm not having much luck. Here's what I tried: print "menu test<br>\n"; my @extras=(); push @extras, { sel_label => "test", label => "test", link => "/plugin.pl", menuorder => 1, seclev => 0, showanon => 1, }; push @extras, { sel_label => "test2", label => "test2", link => "/plugin.pl?op=2", menuorder => 2, seclev => 0, showanon => 1, }; my $menu = createMenu("",{ extra_items => \@extras, style => "tabbed", justify => "right", color => "colored", }); use Data::Dumper; print "<pre>" . Dumper($menu) . "</pre>"; print "menu: $menu\n"; If comment out style => "tabbed", I get output. But nothing is ever a link. Am I setting up the data and calling correctly? Assuming I'm setting up the data structure and calling it correctly (I perldoc Slash::Utility::Display'd) , the only way that I could get this to work was to mod the hell out of createMenu. If being able to create menu's on the fly is something the stock code is supposed to be able to handle, but doesn't for whatever reason, I can fiddle more with reworking it to generate a patch. Hopefully the code already does it and I'm misunderstanding. Any thoughts? Thanks, Shane |