Hi,
Thats a bit trickier. You could try this code:
my $catid = $DB->table("Category")->select( ['ID'], { Name => $args->{catname} })->fetchrow;
if ($catid =~ /^\d+$/) {
$args->{catid} = $catid
}
}
It will only work for top level categories though.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Thats a bit trickier. You could try this code:
Code:
if ($args->{catname}) { my $catid = $DB->table("Category")->select( ['ID'], { Name => $args->{catname} })->fetchrow;
if ($catid =~ /^\d+$/) {
$args->{catid} = $catid
}
}
It will only work for top level categories though.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!