Gossamer Forum
Home : Products : Links 2.0 : Customization :

catagory layout problem

Quote Reply
catagory layout problem
Hello all,

After extensive research in this forum I followed all the steps that I found

You need to edit the sub
print_html_cat routine in EITHER the site_html_templates.pl
and site_html.pl.

Look for the HTML codes between either of the following formats:

TEMPLATES:
(site_html_templates.pl)

$output .= qq| CODES |;
<td width="50%">[/code]
in the $half code area.

2) Add the following HTML special character after the $numlinks codes:

Code:
& n b s p;As I have mentioned before and also in this Thread...the best thing to do is delete all CSS references, like class="classlist" in the site_html_templates.pl file in the sub site_html_print_cat routine...The problem is that CSS codes (which include table alignment codes like classlist) do not show up the same in all web browsers.... You need to delete all the definition list codes: <dl><dt></dl></dt>.
I have done all this but my table is a mess I can't get the catagories in one line below eachotherCan someone take a look at my code?my (@subcat) = @_;
my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i);
my ($half) = int (($#subcat+2) / 2);

# Print Header.
$output = qq|<div><table width="100%" border="3" cellspacing="0" cellpadding="2" bordercolor=#CCCCG><tr><td valign="top" width="50%"><font face="Arial" size=2><a href="$url"><font face="Arial" size=2 color=#FFFF00><b>$category_name</a>($numlinks)&nbsp;\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><font face="Arial" size=1 color=#FFFF00><td valign="top" width=50%>\n|; }
$i++;

# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<B><font face="Arial"size="3"><a href="$url">$category_name</a></font></B>($numlinks)&nbsp;|;
$output .= qq|<small><sup>new</sup></small>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|<BR>|;
$output .= qq|<dd><span>$description </span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|<BR>|;
}# Don't forget to end the unordered list..
$output .= "</td></tr></table></div>\n";
return $output;
}1;
Thanks in advance,Peter.
Subject Author Views Date
Thread catagory layout problem maaneschijn 4737 Sep 22, 2003, 8:04 AM
Thread Re: [maaneschijn] catagory layout problem
Stealth 4526 Sep 22, 2003, 8:10 AM
Thread Re: [Stealth] catagory layout problem
maaneschijn 4526 Sep 22, 2003, 8:16 AM
Thread Re: [maaneschijn] catagory layout problem
Andy 4526 Sep 22, 2003, 8:30 AM
Thread Re: [Andy] catagory layout problem
maaneschijn 4518 Sep 22, 2003, 8:39 AM
Thread Re: [maaneschijn] catagory layout problem
Andy 4507 Sep 22, 2003, 8:43 AM
Post Re: [Andy] catagory layout problem
maaneschijn 4508 Sep 22, 2003, 8:57 AM