Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Making a single column display

Quote Reply
Making a single column display
There is a reference to this in the FAQ, but the link is dead.
How do I change the display to a single column?
Where do I find this subroutine?
I'm using templates.
Looks pretty awful in the default setting!
http://thechaos.net/alert

Quote Reply
Re: Making a single column display In reply to
got it ... had to dig for this since haven' played with the code over year.

got to sub site_html_print_cat either site_html.pl or site_html_template.pl an the line you want is;
my ($half) = int (($#subcat+2) / 2);

there's also towards the bottom another line .. I wonder if it was as simple as commenting out these lines or not .... ????

Well, at least yo have something to go on from here if I'm wrong.

about a year and half ago there were some threads on this issue.

Good luck

**************************************
on the pages in between ...
Quote Reply
Re: Making a single column display In reply to
in site_html_template.cgi
sub site_html_print_cat

I commented out:

# my ($half) = int (($#subcat+2) / 2);

and
# 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="text" valign="top">\n|;
# }
# $i++;

Then I rebuilt the pages.
Alas, there's still two columns, and the first one has no formatting.

http://thechaos.net/alert

Quote Reply
Re: Making a single column display In reply to
Sorry if I'm not being so helpful, but I wonder since the formating is gone that possibly this line should be moved out of the loop to look like this:
# if ($i == $half) {
# $output .= qq|</td><td class="text" valign="top">\n|;
# }
# $i++;
$output .= qq|</td><td class="text" valign="top">\n|;

try that if it doesn't work then we'll need to wait for a guru to stop by.

sorry.

good luck




**************************************
on the pages in between ...
Quote Reply
Re: Making a single column display In reply to
The answer turned out to be so easy I'm stunned.
I backtracked to the default, and then changed
# 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++;

I killed the code referring to the second column like so:

if ($i == $half) {
$output .= qq~\n~;
}
$i++;

Voila, One Column!!

Quote Reply
Re: Making a single column display In reply to
glad you got it working and sorry if I wasn't that helpful.

:-D

**************************************
on the pages in between ...