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 7964 Oct 20, 2004, 8:05 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 7805 Oct 21, 2004, 12:09 AM
Thread Re: [Andy] How can I put link category on the detailed page?
richonmaui 7726 Oct 21, 2004, 2:24 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 7761 Oct 21, 2004, 2:34 AM
Thread Post deleted by richonmaui
richonmaui 7694 Oct 21, 2004, 2:40 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 7789 Oct 21, 2004, 2:46 AM
Thread Re: [Andy] How can I put link category on the detailed page?
richonmaui 7735 Oct 21, 2004, 2:57 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
richonmaui 7750 Oct 21, 2004, 3:29 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 7728 Oct 21, 2004, 4:03 AM
Thread Re: [Andy] How can I put link category on the detailed page?
richonmaui 7767 Oct 21, 2004, 12:11 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
afinlr 7836 Oct 21, 2004, 3:25 PM
Thread Re: [afinlr] How can I put link category on the detailed page?
richonmaui 7660 Oct 21, 2004, 3:55 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
afinlr 7730 Oct 21, 2004, 4:06 PM
Thread Re: [afinlr] How can I put link category on the detailed page?
richonmaui 7656 Oct 21, 2004, 4:27 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
afinlr 7689 Oct 21, 2004, 4:36 PM
Thread Re: [afinlr] How can I put link category on the detailed page?
richonmaui 7660 Oct 21, 2004, 4:56 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
fmp 7622 Jan 16, 2005, 1:30 AM
Post Re: [fmp] How can I put link category on the detailed page?
fmp 7544 Jan 17, 2005, 1:06 PM
Post Re: [afinlr] How can I put link category on the detailed page?
MJ_ 7284 Jul 29, 2006, 3:33 AM