Gossamer Forum
Quote Reply
Category URL
Hi,

I need a global that returns the URL based on the ID

Ex:
<%get_cat_url($ID)%>

What is the best way of doing it?

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Category URL In reply to
Ok I got something to work - is it effecient or is there a smarter way?

Code:
sub {
my $id = shift;
my $db = $DB->table('Category');
my $clean = $DB->table('Category')->select('Full_Name', { ID => $id })->fetchrow;
my $url = $db->as_url($clean);
return $url;
}

http://www.ameinfo.com