From: Tim V. <tv...@va...> - 2004-04-06 14:01:54
|
Shane, In your test script by changing link=> to value=> for the url I was able to generate both a tabbed and oldstyle menu. Whatever template is ultimately called will have to handle the array of links passed in. Note some of the admin menus currently define this array of links explicitly within the template so they may need to be modified to accept the passed in links. Hope that helps somewhat, Tim Vroom On Tuesday 06 April 2004 07:17, Shane wrote: > 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 > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Slashcode-development mailing list > Sla...@li... > https://lists.sourceforge.net/lists/listinfo/slashcode-development |