Gossamer Forum
Home : Products : Links 2.0 : Customization :

How to modify th subcat?

Quote Reply
How to modify th subcat?
Hi;
I am trying to modify the subcategories of this websiet http://www.widgetz.com/links_mods/subcategories.html

But my question is: how do I make the main category and the subcatgories look like this:
Quote:
Software
Compiler, freeware...

instead of
Software

Compiler, freeware

I don't want the double space below the main cat.

I think it has to do with this:
Quote:
if ($#{$subcategories{$subcat}} >= 0 && $description =~ /^SUB.*/) {
$v = 0;
$sub_length = "";
$output .= qq|<small>|;
foreach $subcatsub (sort @{$subcategories{$subcat}}) {
$suburl = "$build_root_url/" . &urlencode($subcatsub) . "/";
if ($subcatsub =~ m,.*/([^/]+)$,) { $subcategory_name = &build_clean($1); }
else { $subcategory_name = &build_clean($subcatsub); }

$sub_length .= qq|, | if ($description =~ /1$/ && $v ne "0");
$sub_length .= qq|$subcategory_name| if ($description =~ /1$/);

if ($description =~ /1$/ && length($sub_length) > $subcat_length) {
$output .= qq|...|;
last;
}
else {
$output .= qq|, | if ($description =~ /1$/ && $v ne "0");
$output .= qq|<br>| if ($description =~ /2$/ &#0124; &#0124; $v eq "0");
$output .= qq| | if ($description =~ /2$/);
$output .= qq|<a href="$suburl">$subcategory_name</a>|;
$v++;
}
}
$output .= qq|</small>|;
}
else {
$output .= qq|<dd><span class="descript">$description</span></dd>| if (!($description =~ /^[\s\n]*$/));
}
$output .= qq&#0124; &#0124;;
}
Quote Reply
Re: How to modify th subcat? In reply to
I don't know if this will work...but try taking out the <br> out of the following line:

Code:
$output .= qq|<br>| if ($description =~ /2$/ | | $v eq "0");

So, it should look like the following:

Code:
$output .= qq&#0124; &#0124; if ($description =~ /2$/ | | $v eq "0");

This may work.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: How to modify th subcat? In reply to
I did tried that, and I got the same thing. I think the <br> tag is separate between the descriptions and the subcat. Since there is no description, then it leaves out the white space.