My global works fine. It takes all the fields from one row in a table and puts it in a hash.
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?
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?