Gossamer Forum
Home : Products : Gossamer Links : Discussions :

redoing category layout

Quote Reply
redoing category layout
When my site builds, the category table is too narrow but I don't know what to format. I see this in Site HTML.pm


$output = qq|<div class="margin"><table $table_head><tr><td class="catlist" width="$width%" valign="top">\n|;

I'm thinking I should reformat either <div class="margin"> or <table $table_head> or <td class="catlist" width="$width%" valign="top> but am not sure where they are to reformat them. Any suggestions?
Quote Reply
Re: [rayhne] redoing category layout In reply to
Check the admin area, in the setup>build I think. There is a global for width of the category table.

If it's not there, it's in the globals.txt file. Can't remember where it was exactly.




PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] redoing category layout In reply to
All it has under Setup/Build is build_category_table and that's set at border=0 width="100%" which, I believe, is what I want there. I don't see anything that might effect it under Globals.

Part of the problem is I don't see anywhere to adjust the "margin" or "catlist" classes. And where is that width pulled from?
Quote Reply
Re: [rayhne] redoing category layout In reply to
I think you need to edit subcategory.html (in the template editing area) Tongue

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] redoing category layout In reply to
Okay, what in the subcategory.html would I need to edit? I've done some experimental edits of the <td> but nothing changes.
Quote Reply
Re: [rayhne] redoing category layout In reply to
Did you do a rebuild? It may sound obvious, but it is probably the most often problem in these kind of matters Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] redoing category layout In reply to
I'm looking at it dynamicly.
Quote Reply
Re: [rayhne] redoing category layout In reply to
I have the following in subcategory.html;

Code:
<table border=0 cellpadding=3 cellspacing=0><tr>

<%-- This is only useful if you have added an Image column to your category table --%>
<%if Image%>
<td width=30 align=center valign=top>
<img src="<%build_images_url%>/default/<%Image%>" border=0></td>
<%else%>
<td width=25>&nbsp;</td>
<%endif%>

<td>
<%body_font%><b><a class="category_links" href="<%URL%>"><%Short_Name%><%if Related%>@<%endif%></a></b> <small><i>(<%Number_of_Links%>)</i></small>

<%if Has_New_Links eq 'Yes'%><font color="red"><small><sup>new</sup></small></font><%endif%>
<%if Has_Changed_Links eq 'Yes'%><font color="red"><small><sup>updated</sup></small></font><%endif%>
<%if Description%><br><%body_font%><%Description%><%endif%>

</td></tr>
</table>




I would change it to;

Code:
<table border=0 cellpadding=3 cellspacing=0><tr>

<%-- This is only useful if you have added an Image column to your category table --%>
<%if Image%>
<td width=30 align=center valign=top>
<img src="<%build_images_url%>/default/<%Image%>" border=0></td>
<%else%>
<td width=30>&nbsp;</td>
<%endif%>

<td width=25>
<%body_font%><b><a class="category_links" href="<%URL%>"><%Short_Name%><%if Related%>@<%endif%></a></b> <small><i>(<%Number_of_Links%>)</i></small>

<%if Has_New_Links eq 'Yes'%><font color="red"><small><sup>new</sup></small></font><%endif%>
<%if Has_Changed_Links eq 'Yes'%><font color="red"><small><sup>updated</sup></small></font><%endif%>
<%if Description%><br><%body_font%><%Description%><%endif%>

</td></tr>
</table>


Add the code in red, and edit the bits in bold to what you want. That is how I would do it, but it may not be what you want.

Hope it helps Unsure

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] redoing category layout In reply to
Actually, the problem is that the table is already over too far to the right. I have the table set to 100% but there's a large gap to the left that's making the table take up maybe 80% rather then 100%. I've removed the <div class=margin></div> but that doesn't help.

Here's the page in question:

http://www.fanficweb.net/...nficdir/page.cgi?d=1
Quote Reply
Re: [rayhne] redoing category layout In reply to
Ok, I think I may have worked out a way to help you Tongue Have a look atthe attached file. See that I have centered the actual category listgins. Theproblem was that the main table was divided up into 3 (so obviously 1/3 eachsection)....so then when the links were placed in they appeared to only use uppart of the area as they are all to the far left.

Well, hopefully looking at the code of the file I uploaded for you a solutioncan be worked out Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] redoing category layout In reply to
But you see, I want them to go to the left. I don't want such a large space on the left side of the categories.
Quote Reply
Re: [rayhne] redoing category layout In reply to
Okay, never mind. I think I got it.
Quote Reply
Re: [rayhne] redoing category layout In reply to
I know this is an old thread, but just had the same problem, and (think) I found the solution/answer:

There is no need to touch sitehtml.pm (should be avoided anyway).
  1. Make sure to set the div margin to zero in your style sheet (.css file or css tag on globals.txt)
  2. in subcategory.html remove or comment out as shown below:


<%else%>

<!-- <td width=25>&nbsp;</td> -->

<%endif%>


The latter is obviously only needed if you have images turned off for categories (images shown next to each category).

To make things look nice you may want to increase the space between the columns for example by changing the first line in subcategory.html to something like:

<table border=
"0" cellpadding="14" cellspacing="0">



Jacob