Sure, shouldn't be too hard - try something like: (tested it locally, and works ok for me)
other_categories
Code:
sub {
my $link_id = $_[0];
my $tbl = $DB->table('CatLinks','Links','Category');
$tbl->select_options('ORDER BY Name');
my $sth = $tbl->select( ['Category.*'], GT::SQL::Condition->new('CatLinks.LinkID','=',$link_id) ) || die $GT::SQL::error;
my @loop;
while (my $hit = $sth->fetchrow_hashref) {
$hit->{URL} = $CFG->{build_root_url} . "/" . $DB->table('Category')->as_url( $hit->{Full_Name} ) . "/" . $CFG->{build_index};
push @loop, $hit;
}
return { loop_other_categories => \@loop };
}
Then call with:
Code:
<%other_categories($ID)%>
<%if loop_other_categories.length%>
<ul>
<%loop loop_other_categories %>
<li><a href="<%URL%>"><%Name%></a></li>
<%endloop%>
</ul>
<%endif%>
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work! Want to give me something back for my help? Please see my
Amazon Wish List GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500) Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin |
Pre-Made Template Sets |
FREE GLinks Plugins! Compare our different Plugin packages *new* Free CSS Templates