Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Templates recognising a global hash

Quote Reply
Templates recognising a global hash
My global works fine. It takes all the fields from one row in a table and puts it in a hash.

Code:
sub {
my $fitemp = $IN->param('fi') || 1;
my $menudata = $DB->table('F_menus')->select({ fran_id => $fitemp })->fetchrow_hashref;
return ($menudata);
}


But how do I access the information in it?

The templates will recognise an item in my global, for example:
<%menu5a%>

but....
ONLY if I have referred to the global itself somewhere, for example.
<%if menudata%><%endif%>

There must be a better way! Perhaps an alteration to my global?
Subject Author Views Date
Thread Templates recognising a global hash tora 2282 Oct 22, 2007, 4:34 AM
Thread Re: [tora] Templates recognising a global hash
brewt 2209 Oct 22, 2007, 11:53 AM
Post Re: [brewt] Templates recognising a global hash
tora 2172 Oct 22, 2007, 1:37 PM