Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Single column category list?

Quote Reply
Single column category list?
Has anyone worked at all on this?

A single column with all top level categories listed, hotlinked to their html files? I know there were at least 2 different mods to do this for Links 2.0, and figured I'd ask before re-inventing the wheel here...

Or if you have any idea of where to begin... As this is an area I am less than familiar with...

Thanks,

AlexJ

Quote Reply
Re: Single column category list? In reply to
You can specify the number of columns in the admin panel.

Setup > Build Options > build_category_columns

Paul Wilson.
http://www.wiredon.net/gt/
http://www.perlmad.com/
Quote Reply
Re: Single column category list? In reply to
I'll admit I have not played with that - but from what I had read, it specifies the number of colums for the sub-categories, and I don't see how I could achieve what I am trying to do with it....

I'm looking for a way to have a list of all the top level categories that are available, to put on the main page, category pages and my detailed pages.

Thanks for any help/ideas -

AlexJ

Quote Reply
Re: Single column category list? In reply to
I am not sure but try this global:

sub {
# Displays the Father categories.
my ($output,$sth,$cat);
my $cat_db = $DB->table('Category');
$cat_db->select_options ("ORDER BY $CFG->{build_category_sort}") if ($CFG->{build_category_sort});
$sth = $cat_db->select ( { FatherID => 0 } );
$root = [{}];
while (my $cat = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('print_cat', $root );
}
return $output;
}

Regards
Abd

http://www.idleb.com
Quote Reply
Re: Single column category list? In reply to
That didn't quite do it - but its definately a step in the right direction. I'm working on perfecting that global routine right now. I will post it once I have it complete...

AlexJ

Quote Reply
Re: Single column category list? In reply to
Ok,

I've got this working now. Unfortunately, it took a little more than just an added global routine though. Its a combination of a global routine, an added sub routine, and an added template. The result gives you:

Category1
Category2
Caregory3
Etc....

Linked to the category. No sub categories are included. The list is done with no formatting done in the software, so its left up to the user in the template.

If anyone has any use for this please let me know, I will throw it all together in a plugin....

AlexJ

Quote Reply
Re: Single column category list? In reply to
Will you Post what you did here or as a plug in please.

I can find a use for it on my site for sure.

Regards
Abd

http://www.idleb.com
Quote Reply
Re: Single column category list? In reply to
AlexJ --

I've been looking for exactly this. Would love it in a plug in, if you had the time.. as my Perl skills are minimal.

Quote Reply
Re: Single column category list? In reply to
Ok -

I should have this available for download within the next 2 days or so.... I'm using it as part of a larger project and need to extract it to make it into a plugin.

AlexJ