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

Getting Category info Via an ID

Quote Reply
Getting Category info Via an ID
I need to get a category detailes in a loop like <%category_loop%> would return, but by passing in a Category ID.

Some somthing like:

<%CatInfo($123)%>
<%loop catinfo%>
xxxxx
<%endloop%>

Has this been done? I see lots of globals for getting cat info related to a Link ID, but not a Cat ID.

~ ERASER


Free JavaScripts @ Insight Eye

Last edited by:

Eraser: Apr 20, 2008, 11:42 AM
Quote Reply
Re: [Eraser] Getting Category info Via an ID In reply to
Hi,

Not 100% sure what you are trying to do? If you are just passing in a category ID, you could use:

<%get_category_details(1234)%> (where 1234 is the category you want to get the details for)

Global: get_category_details

Code:
sub {
my $cat = $DB->table('Category')->select( { ID => $_[0] } )->fetchrow_hashref;
return $cat;
}

Is that what your after?

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Getting Category info Via an ID In reply to
Indded it is!

I had a much longer piece of code but diddnt work, so I gave up on it.

Many thanks Andy, works good, and wow - simply too!

~ ERASER


Free JavaScripts @ Insight Eye
Quote Reply
Re: [Eraser] Getting Category info Via an ID In reply to
heheh - np. Simple is always good <G>

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates