Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Re: [ukresident] Subcategories

Quote Reply
Re: [ukresident] Subcategories In reply to
The space is likely a result of the definition list tags, I would remove them. Here is what I have on mine, it is a bit different tha what I linked to above. I have changed around the comma and dots at the end. You change the number of links that appear by changing the blue number. Note that I use CSS, and the tags here are based on my own stylesheet. For testing, just use HTML tags.

The 'more&#187' produces this: moreĽ


Code:
if ($#{$subcategories{$subcat}} >= 0) {
$v = 0;
$output .= qq~<div class="home-cat">~;
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);}
$output .= qq~<a class="cat2" href="$suburl">$subcategory_name</a>~ if ($v <= 5);
$output .= qq~,&#160;\n~ if ($v ne $#{$subcategories{$subcat}} && $v <= 5);
$output .= qq~<a class="cat2" href="$url"> more&#187;</a>\n~ if ($v eq "5");
$v++;
}
$output .= qq~</div>~;
}
$i++;
}
$output .= "</div>\n";
return $output;
}



Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Oct 24, 2004, 7:34 PM
Subject Author Views Date
Thread Subcategories ukresident 3922 Oct 24, 2004, 3:55 AM
Thread Re: [ukresident] Subcategories
PerlFlunkie 3832 Oct 24, 2004, 2:39 PM
Thread Re: [PerlFlunkie] Subcategories
ukresident 3818 Oct 24, 2004, 3:17 PM
Thread Re: [ukresident] Subcategories
PerlFlunkie 3811 Oct 24, 2004, 3:55 PM
Thread Re: [PerlFlunkie] Subcategories
ukresident 3816 Oct 24, 2004, 4:04 PM
Thread Re: [ukresident] Subcategories
PerlFlunkie 3841 Oct 24, 2004, 4:08 PM
Thread Re: [PerlFlunkie] Subcategories
ukresident 3817 Oct 24, 2004, 4:14 PM
Thread Re: [ukresident] Subcategories
ukresident 3835 Oct 24, 2004, 4:24 PM
Thread Re: [ukresident] Subcategories
ukresident 3809 Oct 24, 2004, 5:16 PM
Thread Re: [ukresident] Subcategories
ukresident 3812 Oct 24, 2004, 5:33 PM
Post Re: [ukresident] Subcategories
PerlFlunkie 3793 Oct 24, 2004, 7:32 PM