Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [iplay] Display category column on detailed page?

Quote Reply
Re: [iplay] Display category column on detailed page? In reply to
Hi,

To have that work, you would need a global. Something like this:

get_category_details
Code:
sub {
my $tbl = $DB->table('CatLinks');
$tbl->select_options("ORDER BY CategoryID");
my $cat_id = $tbl->select ( ['CategoryID'], { LinkID => $_[0] } )->fetchrow;
my $cat = $DB->table('Category')->get( { ID => $cat_id } );
my $hit;
map { $hit->{"category_" . %_} = $cat->{$_} } keys %$cat;
return $hit;
}

(just wrote it, so unteested ;))

Call with:

<%get_category_details($ID)%>

..then call the category fields with category_ prefixing the fields, for example:

<%category_Full_Name%>, <%category_Number_of_Hits%>, etc

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!
Subject Author Views Date
Thread Display category column on detailed page? iplay 4757 Aug 15, 2009, 4:32 AM
Thread Re: [iplay] Display category column on detailed page?
Andy 4679 Aug 15, 2009, 6:05 AM
Thread Re: [Andy] Display category column on detailed page?
iplay 4665 Aug 15, 2009, 8:06 AM
Post Re: [iplay] Display category column on detailed page?
iplay 4657 Aug 15, 2009, 9:55 AM
Thread Re: [Andy] Display category column on detailed page?
Andy 4638 Aug 15, 2009, 11:29 PM
Thread Re: [Andy] Display category column on detailed page?
iplay 4641 Aug 16, 2009, 8:43 AM
Thread Re: [iplay] Display category column on detailed page?
Andy 4641 Aug 16, 2009, 8:46 AM
Thread Re: [Andy] Display category column on detailed page?
iplay 4633 Aug 16, 2009, 9:33 AM
Post Re: [iplay] Display category column on detailed page?
Andy 4604 Aug 17, 2009, 12:11 AM