Gossamer Forum
Home : Products : Gossamer Links : Discussions :

View all links in sub-categories

Quote Reply
View all links in sub-categories
I am looking for a way to display all the links in a given category and its subcategories at the same time. Then give users the ability to narrow it down to the specific sub-category.

Example...user goes to the "job section" and can see a list of the latest jobs added from all sub-categories in jobs. Yet can also see the links to individual category to narrow it down.

Any suggestions?
Quote Reply
Re: [Soren] View all links in sub-categories In reply to
Hi,

Mmm.. you could do it with a custom script. Something along these lines;

Code:
my $catID = 111; # set as the category you wanna ge sub-cats of

my $catids = $DB->table('Category')->children($catID); # business

my $tbl = $DB->table('CatLinks','Links');

my $sth = $tbl->select( ['Links.Photo','Links.ID'] , GT::SQL::Condition->new ('CatLinks.CategoryID', 'IN', $catids, 'isValidated', '=', 'Yes' ) ) || die $GT::SQL::error;

while (my $hit = $sth->fetchrow_hashref) {
# you have access to all values from glinks_Links and glinks_CatLinks here - so would need to get the values from glinks_Category seperatly
}

I can't afford the time to write the whole thing for you I'm afraid - spent too much of my Xmas hol's helping people out this year Tongue

Hope that helps though.

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