Gossamer Forum
Quote Reply
Using as_url
 
sub {
my $tags = shift;
my $lnkid = $tags->{'ID'};
my $db = $DB->table ('Category','CatLinks');
my $catname = $db->select ( { LinkID => $lnkid }, ['Full_Name'] )->fetchrow;
return $CFG->{build_root_url} . "/" . $catname . "/";
}


That returns a full category name from a link ID. The only issue is the output is like:

site.com/Cars/Ford Cruger/


rather than a correct category output:

site.com/cars/ford-escort/


This code I believe gives the correct result, but I'd be damed if I can integrate this right!

return $CFG->{build_root_url} . "/" . $cat_table->as_url($cat->{Full_Name}) . "/";

Any help really appreciated.

~ ERASER


Free JavaScripts @ Insight Eye
Subject Author Views Date
Thread Using as_url Eraser 1663 Jul 19, 2007, 1:01 PM
Post Re: [Eraser] Using as_url
Andy 1590 Jul 20, 2007, 2:02 AM