Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Whats Cool - Downsizing

Quote Reply
Whats Cool - Downsizing
Is it possible to hold the "What's Cool" template to just the top level categories? But still take into effect all links within the subcategories below the category.

Now:

XCategory : XSubcategory : XXSubcategory
Link Name and Data

Preferred:

XCategory
Link Name and Data

Thanks in advance!

Smile
Quote Reply
Re: [Teambldr] Whats Cool - Downsizing In reply to
You could remove the grouping (to get rid of the categories from the output) then a variation on the root cats global :

sub {
my $tags = shift;
my $cat_db = $DB->table('Category');
my @root_cats = $cat_db->select (['Full_Name'], { FatherID => 0 })->fetchall_list;
my $output;
foreach my $root_cat (@root_cats) {
my $url = $cat_db->as_url($root_cat);
$output .= qq~<a href="$CFG->{build_root_url}/$url">$root_cat</a><br>~;
}
return $output;
}

This would have to be modified so it would display only the rootcat which is a parent of the current link id (I am pretty sure links already has a bit of code which checks to see if a link is a child of a category)

EDIT: hmmm... sorry my solution is still garbage.. I looked at build.pm (lines 338 - 347) where the loop is produced. Better to make a global than change this.


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Jul 15, 2002, 8:30 PM
Quote Reply
Re: [Ian] Whats Cool - Downsizing In reply to
So, not something you would suggest eh?

With so many subcats (same as yours) it makes it a real issue to find the What's Cool for the category of choice. I thought that by trimming it down to just pulling the top per category it would make it only a page or two deep.

Just an idea. Thanks though!Cool
Quote Reply
Re: [Teambldr] Whats Cool - Downsizing In reply to
My personal preference is to include the categories with each link... that tidies it up a little I find.

Shepody Pheasant Hunting Preserve
Shepody Pheasant Hunting Preserve is located on the Bay of Fundy near Mary's Point. Game bird hunting, lodge, sporting dogs. 45min Moncton, New Brunswick.
(Added: Sun May 19 2002 Hits: 0 Rating: Votes: 0) Rate It Review It
Category: Regional/New_Brunswick/Recreation_and_Sports/Hunting


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Whats Cool - Downsizing In reply to
No, that looks great but I have 34 pages of What's Cool so I was looking for a way to limiit the output to about 2 or so pages at most for all categories.Smile
Quote Reply
Re: [Teambldr] Whats Cool - Downsizing In reply to
Hmmm, maybe just the link title's like in Remote Count? Or a variation on that concept would be good.


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Whats Cool - Downsizing In reply to
This would be the output that I would like:
Airline Industry
AB Airlines pop
http://www.abairlines.com/
(Added: Fri Feb 22 2002 Hits: 12 Rating: 0.00 Votes: 0) Rate It Review It
Appliance Industry
Top Link from this category
Audio Industry
Top Link from this category
Aviation Industry
Top Link from this category
Beer Industry
Top Link from this category
and so on...


If I were able to do this I would have 27 links showing (currently). Remote Count is GREAT but it would not be able to do this style of output. This is more along the lines of Five Cats and the way IT thinks.

The output would be the most popular per category.
Quote Reply
Re: [Teambldr] Whats Cool - Downsizing In reply to
I may have what you want...private message incoming...


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Jul 15, 2002, 9:38 PM