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 7030 Oct 20, 2004, 8:05 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 6895 Oct 21, 2004, 12:09 AM
Thread Re: [Andy] How can I put link category on the detailed page?
richonmaui 6826 Oct 21, 2004, 2:24 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 6849 Oct 21, 2004, 2:34 AM
Thread Post deleted by richonmaui
richonmaui 6786 Oct 21, 2004, 2:40 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 6889 Oct 21, 2004, 2:46 AM
Thread Re: [Andy] How can I put link category on the detailed page?
richonmaui 6829 Oct 21, 2004, 2:57 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
richonmaui 6833 Oct 21, 2004, 3:29 AM
Thread Re: [richonmaui] How can I put link category on the detailed page?
Andy 6819 Oct 21, 2004, 4:03 AM
Thread Re: [Andy] How can I put link category on the detailed page?
richonmaui 6841 Oct 21, 2004, 12:11 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
afinlr 6891 Oct 21, 2004, 3:25 PM
Thread Re: [afinlr] How can I put link category on the detailed page?
richonmaui 6761 Oct 21, 2004, 3:55 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
afinlr 6830 Oct 21, 2004, 4:06 PM
Thread Re: [afinlr] How can I put link category on the detailed page?
richonmaui 6750 Oct 21, 2004, 4:27 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
afinlr 6779 Oct 21, 2004, 4:36 PM
Thread Re: [afinlr] How can I put link category on the detailed page?
richonmaui 6757 Oct 21, 2004, 4:56 PM
Thread Re: [richonmaui] How can I put link category on the detailed page?
fmp 6704 Jan 16, 2005, 1:30 AM
Post Re: [fmp] How can I put link category on the detailed page?
fmp 6645 Jan 17, 2005, 1:06 PM
Post Re: [afinlr] How can I put link category on the detailed page?
MJ_ 6387 Jul 29, 2006, 3:33 AM