Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Category list global including build_category_columns

Quote Reply
Category list global including build_category_columns
I currently have my root level cats displaying in 5 columns on my home page and want to be able to include this table on a number of other pages.

I know I can display a list of cats using a category list global like this:

sub {
my $tags = shift;
my $cat_db = $DB->table('Category');
$cat_db->select_options ('ORDER BY Name');
my $sth = $cat_db->select ( { FatherID => 0}, ['Full_Name','Name'] );
my $output="";
while (my ($root_cat,$full_name) = $sth->fetchrow_array) {
my $url = $cat_db->as_url($root_cat);
$output .= qq~<li><a href="$CFG->{build_root_url}/$url/"><b>$full_name</b></a></li>~;
}
return $output;
}


But I am having trouble getting this to output a table with "build_category_columns" columns.

I have looked at site_html_print_cat to try and get some ideas, but not having much success. I know I could hard code a table and call it in, but my number of categories is expected to change quite a bit and its on the cards that I will be changing the number of columns now and again also, so I would rather this be all automated.

If anyone could help with this it would be appreciated Smile

cheers
Mark
Subject Author Views Date
Thread Category list global including build_category_columns marker 3861 Oct 4, 2003, 7:53 PM
Thread Re: [marker] Category list global including build_category_columns
marker 3769 Oct 6, 2003, 4:56 PM
Thread Re: [marker] Category list global including build_category_columns
ccunet 3711 May 8, 2004, 6:46 PM
Thread Re: [ccunet] Category list global including build_category_columns
marker 3692 May 9, 2004, 2:05 AM
Thread Re: [marker] Category list global including build_category_columns
ccunet 3711 May 10, 2004, 9:41 AM
Thread Re: [ccunet] Category list global including build_category_columns
ccunet 3593 Feb 21, 2005, 5:54 PM
Thread Re: [ccunet] Category list global including build_category_columns
afinlr 3580 Feb 22, 2005, 5:21 AM
Post Re: [afinlr] Category list global including build_category_columns
ccunet 3586 Feb 22, 2005, 6:22 AM