Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

Space between category columns on homepage

Quote Reply
Space between category columns on homepage
Hello All,
I am trying to place a small table between the Category columns on the homepage. I am using the description there so I just need a little space to have a break between the columns. Like </td><td width="14"></td>. I know where the categories are built: sub site_html_print_cat, I just don't know how to add this after the breakpoint.

Yes, I have searched this forum.

Thanks,
R White




Quote Reply
Re: Space between category columns on homepage In reply to
My line numbers will be different from yours, so I can't give you an exact spot. You know the subroutine, so look for the section near the bottom:

Code:
# 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).
# ($i and ($i % $breakpoint)) or ($output .= qq|</td><td valign="top">\n|);
# $i++;
if ($i == 0){} #added
else { ($i and ($i % $breakpoint)) or ($output .= qq|</td><td width="14"></td><td width="50%" valign="top">\n|);}
$i++;
Play with the html output however you see fit.

Dan

Quote Reply
Re: Space between category columns on homepage In reply to
Dan,
I tried this a few different ways and end up with no categories on the home page. Where would the if statement fit into my current routine.

# 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).
($i and ($i % $breakpoint)) or ($output .= qq|</td><td class="catlist" valign="top">\n|);
$i++;
defined $dynamic and &load_user ($dynamic, $cat_r);
$output .= &load_template ('subcategory.html', { %$cat_r, %GLOBALS }, undef, $template);
}
# Don't

Quote Reply
Re: Space between category columns on homepage In reply to
I don't see any reason why it wouldn't work... You're not adding that section to your current routine, you're just adjusting the line in that section that prints out the table cells if it's halfway through the category list.

An easier way might be to just add some cellpadding or cellspacing to the table?

Dan

Quote Reply
Re: Space between category columns on homepage In reply to
Dan,
Adjusting the cellspacing worked fine, thank you.



Quote Reply
Re: Space between category columns on homepage In reply to
What would the code look like to add cellpadding and/or cellspacing to have some more separation between the two columns?

Thanks.

Mark G.

Quote Reply
Re: Space between category columns on homepage In reply to
In HTML_Templates.pm:

sub site_html_print_cat {
...
# Print Header.
$output = qq|<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">\n|;


Change it to whatever values you prefer.

Dan

Quote Reply
Re: Space between category columns on homepage In reply to
Dan,

Thanks for your help!

Mark G.