Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [yogi] display category path in link.html

Quote Reply
Re: [yogi] display category path in link.html In reply to
Thank you! It is working right now!! Cool

For all the others... The final code is:

1) Create global named get_link_cats and put inside:

Code:


sub {
my $id = shift;
my $cat_db = $DB->table('Category');
my $catlink = $DB->table('CatLinks','Category');
my @names = $catlink->select ({ LinkID => $id }, ['Full_Name'])->fetchall_list;

my @link_cats;
for (@names) {

push @link_cats, { cat_name => Links::Build::build ('title_unlinked',$_), cat_url => $cat_db->as_url($_)};
}
return { link_cats => \@link_cats };
}


2) Then put this in your detailed template (or elsewhere):

Code:
<%get_link_cats($ID)%>
<%loop link_cats%>
<a href="http://www.yourdomain.com/yourpath/<%cat_url%>" target="_top"><%cat_name%></a><br>
<%endloop%>
And there you goo... Wink
Subject Author Views Date
Thread display category path in link.html jeremy_ohp 10005 Jul 21, 2001, 5:37 PM
Thread Re: display category path in link.html
poil11 9888 Jul 24, 2001, 10:21 AM
Post Re: [poil11] display category path in link.html
Nomada 9670 Mar 19, 2002, 9:44 AM
Thread Re: [poil11] display category path in link.html
Robo 9499 Jul 25, 2002, 5:21 AM
Thread Re: [Robo] display category path in link.html
yogi 9522 Jul 25, 2002, 5:29 AM
Thread Re: [yogi] display category path in link.html
Paul 9539 Jul 25, 2002, 5:30 AM
Thread Re: [Paul] display category path in link.html
yogi 9478 Jul 25, 2002, 5:31 AM
Post Re: [yogi] display category path in link.html
Paul 9462 Jul 25, 2002, 5:35 AM
Thread Re: [yogi] display category path in link.html
Robo 9529 Jul 25, 2002, 7:05 AM
Thread Re: [Robo] display category path in link.html
yogi 9576 Jul 25, 2002, 1:27 PM
Thread Re: [yogi] display category path in link.html
Robo 9514 Jul 26, 2002, 12:48 AM
Thread Re: [Robo] display category path in link.html
yogi 9481 Jul 26, 2002, 1:04 AM
Thread Re: [yogi] display category path in link.html
Robo 9532 Jul 26, 2002, 2:13 AM
Thread Re: [Robo] display category path in link.html
Robo 9488 Jul 26, 2002, 6:24 AM
Post Re: [Robo] display category path in link.html
gatman 9192 Dec 27, 2002, 8:32 AM
Post Re: [Robo] display category path in link.html
lobito 8149 Oct 5, 2006, 8:55 AM