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

Products: Gossamer Links: Development, Plugins and Globals: Re: [sahertianr] Global to show Main Category (Father) of the subcategories.: Edit Log

Here is the list of edits for this post
Re: [sahertianr] Global to show Main Category (Father) of the subcategories.
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

Edit Log: