Gossamer Forum
Home : Products : Links 2.0 : Customization :

alignment & missing info problem in main directory

Quote Reply
alignment & missing info problem in main directory
Hi again. I have 2 new problems. See www.waterwater.ca.
This is what I have in sub site_html_print_cat:

my (@subcat) = @_;

my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i);

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

# Print Header.

$output = qq|<div class="margin"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="category" valign="top">\n|;

foreach $subcat (sort @subcat) {

($description) = @{$category{$subcat}}[2];

# First let's get the name, number of links, and last modified date...

$url = "$build_root_url/" . &urlencode($subcat) . "/";

if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat); }

$numlinks = $stats{"$subcat"}[0];

$mod = $stats{"$subcat"}[1];

# 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="category" valign="top">\n|;



# Then we print out the name linked, new if it's new, and popular if its popular.

$output .= qq|<strong><a class="link" href="$url">$category_name</a></strong> <small class="numlinks">($numlinks)</small> |;

$output .= qq|<small><sup class="new">new</sup></small>| if (&days_old($mod) < $db_new_cutoff);

$output .= qq|<br>|;

for (@{$subcategories{$subcat}}) {

if (m,^\Q$subcat\E/([^/]+)$,) {

$child = $1;

$clean = &build_clean($1);

$output .= qq|<a href="$build_root_url/$subcat/$child/"><font size="2">$clean</font></a>,|;

$output .= qq|<BR>| if $j == 2;


if ($j == 4) {

$j = 0;





$output =~ s/,$//;

$output .= qq|<br><br>|;

$output .= qq|<span class="descript">$description </span>| if (!($description =~ /^[\s\n]*$/));


# Don't forget to end the unordered list..

$output .= "</td></tr></table></div>\n";

return $output;


The problems are:

1. In the last category, Tanks, I have 2 subcategories, but only 1 shows up in this directory. If you click on Tanks, you will see that the second subcategory is actually there, but for some reason, it doesn't show in the main directory. This is the only category I'm having this problem with. Why?

2. In some categories, the subcategories are listed in 1 line, and others they go onto 2 lines. How do I get them to all go onto 1 line until they are too long, and then automatically wrap to the next line?


Quote Reply
Re: [ceniti] alignment & missing info problem in main directory In reply to
In addition to my original post:
I've added all my categories now, and rebuilt. It's actually not showing at least 1/3 of the subcategories that should be on this page. Click on Process Equipment (main category link) and you'll see what I mean. Why can't I get all subs to show up??

Additionally, is there a way to have more of a space between the subcategories? They really bleed into each other.
Quote Reply
Re: [ceniti] alignment & missing info problem in main directory In reply to