Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [afinlr] How can I put link category on the detailed page?

Quote Reply
Re: [afinlr] How can I put link category on the detailed page? In reply to
Ok, that works great, showing multiple category links (when appropriate) on the detailed pages.

Here's the whole thing in one place:

Create a new global: LSQL Admin > Build > Template Globals

global name: get_link_cats


sub {
my $id = shift;
my $db = $DB->table ('Category','CatLinks');
my $sth = $db->select ( { LinkID => $id }, ['Name','Full_Name'] );
my $cat;
while (my ($name,$full_name) = $sth->fetchrow_array) {
my $test = Links::Build::build('title_linked', { name => $full_name, complete => 1 });
$cat .= qq~<li>$test<br>~;
}
return $cat;
}


use this to call the global on the page:

<%get_link_cats($ID)%>
<%loop link_cats%>
<a href="<%build_root_url%>/<%cat_url%>"><%cat_name%><br>
<%endloop%>

Subject Author Views Date
Thread How can I put link category on the detailed page? richonmaui 7888 Oct 20, 2004, 8:05 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 7729 Oct 21, 2004, 12:09 AM
Thread Re: [Andy] How can I put link category on the detailed page?
richonmaui 7651 Oct 21, 2004, 2:24 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 7684 Oct 21, 2004, 2:34 AM
Thread Post deleted by richonmaui
richonmaui 7618 Oct 21, 2004, 2:40 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 7713 Oct 21, 2004, 2:46 AM
Thread Re: [Andy] How can I put link category on the detailed page?
richonmaui 7659 Oct 21, 2004, 2:57 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
richonmaui 7673 Oct 21, 2004, 3:29 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 7652 Oct 21, 2004, 4:03 AM
Thread Re: [Andy] How can I put link category on the detailed page?
richonmaui 7691 Oct 21, 2004, 12:11 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
afinlr 7759 Oct 21, 2004, 3:25 PM
Thread Re: [afinlr] How can I put link category on the detailed page?
richonmaui 7583 Oct 21, 2004, 3:55 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
afinlr 7654 Oct 21, 2004, 4:06 PM
Thread Re: [afinlr] How can I put link category on the detailed page?
richonmaui 7580 Oct 21, 2004, 4:27 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
afinlr 7613 Oct 21, 2004, 4:36 PM
Thread Re: [afinlr] How can I put link category on the detailed page?
richonmaui 7583 Oct 21, 2004, 4:56 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
fmp 7546 Jan 16, 2005, 1:30 AM
Post Re: [fmp] How can I put link category on the detailed page?
fmp 7468 Jan 17, 2005, 1:06 PM
Post Re: [afinlr] How can I put link category on the detailed page?
MJ_ 7209 Jul 29, 2006, 3:33 AM