Gossamer Forum
Home : Products : Gossamer Links : Discussions :

<%Category_Name%> on Detailed Page

Quote Reply
<%Category_Name%> on Detailed Page
I was wondering if it is possible to show "Category Name" on the detailed page.

Thanks for the help.

Vishal Thakkar

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] <%Category_Name%> on Detailed Page In reply to
Hopefully this should give you all categories that a link is in.

sub {
my $tags = shift;
my $id = $tags->{'ID'};
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 = GT::Plugins->dispatch ("$CFG->{admin_root_path}/Plugins", "build_title_unlinked", 1, "$full_name");
$full_name =~ s/ /_/g;
$cat .= qq~<a href="CFG->{build_root_url}/$full_name/index.html">$test</a><br>~;
}
return $cat;
}
Quote Reply
Re: [afinlr] <%Category_Name%> on Detailed Page In reply to
Hi afinlr,

Thanks for taking time to help me out.. I am gonna check it this global out.

Smile Smile Smile Smile Smile Smile Smile

Vishal Thakkar

Vishal
-------------------------------------------------------

Last edited by:

NeedScripts.Com: Aug 5, 2003, 2:42 AM
Quote Reply
Re: [NeedScripts.Com] <%Category_Name%> on Detailed Page In reply to
Before you do, let me make a correction!

sub {
my $tags = shift;
my $id = $tags->{'ID'};
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_unlinked', $full_name);
$full_name =~ s/ /_/g;
$cat .= qq~<a href="CFG->{build_root_url}/$full_name/index.html">$test</a><br>~;
}
return $cat;
}