Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [sahertianr] Global to show Main Category (Father) of the subcategories.

Quote Reply
Re: [sahertianr] Global to show Main Category (Father) of the subcategories. In reply to
You could try something like;

<%global_name($ID)%> (this will work in link.html).

Code:
sub {

my $ID = $_[0];
my $FATHERID = $DB->table('CatLinks')->select( ['CategoryID'], { LinkID => $ID } )->fetchrow;
my $name = $DB->table('Category')->select( ['Name'], { ID => $FATHERID })->fetchrow;

$name ? return $name : return 'No name found';

}

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Oct 2, 2004, 4:59 AM
Subject Author Views Date
Thread Global to show Main Category (Father) of the subcategories. sahertianr 7657 Oct 1, 2004, 7:46 AM
Post Re: [sahertianr] Global to show Main Category (Father) of the subcategories.
pugdog 7529 Oct 1, 2004, 11:24 AM
Thread Re: [sahertianr] Global to show Main Category (Father) of the subcategories.
Andy 7562 Oct 1, 2004, 11:46 PM
Thread Re: [Andy] Global to show Main Category (Father) of the subcategories.
sahertianr 7534 Oct 2, 2004, 2:17 AM
Thread Re: [sahertianr] Global to show Main Category (Father) of the subcategories.
Andy 7603 Oct 2, 2004, 2:22 AM
Thread Re: [Andy] Global to show Main Category (Father) of the subcategories.
sahertianr 7553 Oct 2, 2004, 2:34 AM
Thread Re: [sahertianr] Global to show Main Category (Father) of the subcategories.
Andy 7505 Oct 2, 2004, 2:38 AM
Thread Re: [Andy] Global to show Main Category (Father) of the subcategories.
sahertianr 7526 Oct 2, 2004, 4:54 AM
Thread Re: [sahertianr] Global to show Main Category (Father) of the subcategories.
Andy 7488 Oct 2, 2004, 5:00 AM
Thread Re: [Andy] Global to show Main Category (Father) of the subcategories.
sahertianr 7499 Oct 2, 2004, 5:11 AM
Thread Re: [sahertianr] Global to show Main Category (Father) of the subcategories.
Andy 7515 Oct 2, 2004, 8:21 AM
Thread Re: [Andy] Global to show Main Category (Father) of the subcategories.
sahertianr 7550 Oct 2, 2004, 8:51 AM
Thread Re: [sahertianr] Global to show Main Category (Father) of the subcategories.
Andy 7571 Oct 2, 2004, 8:59 AM
Thread Re: [Andy] Global to show Main Category (Father) of the subcategories.
sahertianr 7484 Oct 2, 2004, 9:08 AM
Thread Re: [sahertianr] Global to show Main Category (Father) of the subcategories.
Andy 7506 Oct 2, 2004, 9:14 AM
Thread Re: [Andy] Global to show Main Category (Father) of the subcategories.
sahertianr 7483 Oct 2, 2004, 9:19 AM
Thread Re: [sahertianr] Global to show Main Category (Father) of the subcategories.
sahertianr 7518 Oct 4, 2004, 1:02 AM
Thread Re: [sahertianr] Global to show Main Category (Father) of the subcategories.
afinlr 7417 Oct 6, 2004, 11:24 AM
Post Re: [afinlr] Global to show Main Category (Father) of the subcategories.
sahertianr 7417 Oct 6, 2004, 12:26 PM