Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Category Lists in Single Column?

Quote Reply
Category Lists in Single Column?
I have seen posts on changing the category list layout to be 3 columns instead of two, but is there a way to change it so it only prints a single column of categories?
Quote Reply
Re: Category Lists in Single Column? In reply to
You can get the resource centre templates and see how it is done.

John
Quote Reply
Re: Category Lists in Single Column? In reply to
ladyofdragons,

I just had this same question and the answer was pretty straight-forward (btw, I checked all of the resource templates available here at the Gossamer Threads site, but didn't see that the necessary code changes for a one-column display were implemented; then again, I may have missed it).

To create just a single column display of categories, I commented-out the following lines in sites_html_templates.pl:

From this,
Quote:
# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
if ($i == $half) {
$output .= qq|</td><td class="catlist" valign="top">\n|;
}
$i++;

to this,

Quote:
# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
# if ($i == $half) {
# $output .= qq|</td><td class="catlist" valign="top">\n|;
# }
$i++;

This bit of code starts on line 395 of the site_html_templates.pl file if you have word wrap turned OFF.

Ammendment (Dec. 10, 1999): Whatever you do, don't comment-out that last line with the $i++; on it (like I had indicated when I originally posted this message). I did this and it messed-up my $numlinks ability to count how many links were in certain sub-cats.

Douglas

[This message has been edited by Douglas (edited December 10, 1999).]