I have a global
get_link_cats that puts the category information into a loop:
Code:
sub {
my $tags = shift;
my $id = $tags->{ID};
my $cat_db = $DB->table('Category');
my $catlink = $DB->table('CatLinks','Category');
my %names = $catlink->select ('LinkID', 'Full_Name', { LinkID => $id })->fetchall_list;
my @link_cats;
foreach (keys %names) {
push @link_cats, {cat_name => Links::Build::build ('title_unlinked', $names{$_}), cat_url => $cat_db->as_url($names{$_})};
}
$tags->{link_cats} = \@link_cats;
return $tags;
}
It is called in links.html, using
Code:
<%get_link_cats%>
<%loop link_cats%>
<dd><small>Category: <a href="<%cat_url%>"><%cat_name%></small></dd>
<%endloop%>
This should work.
Ivan
-----
Iyengar Yoga Resources /
GT Plugins