Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Picky Problems: Sort date, categories layout

Quote Reply
Picky Problems: Sort date, categories layout
Well, I'm in the final stretch of this Links SQL configuration... thanks for all the help so far!

My last two details to get cleared up are these:

1. I would like all my links to be listed with the newest links first, oldest links last. I think they're sorting alphabetically now. Maybe.

2. On any page with categories, I will *always* get a horizontal scroll bar at every resolution. This only occurs on pagees with the categories; if I have a page with just links, it wraps correctly and the scroll bar disappears.

Anyone have any pointers?

--Bri

Quote Reply
Re: Picky Problems: Sort date, categories layout In reply to
I think that I can at least answer #1. Change:

'build_sort_order_category' => 'Title',

To:

'build_sort_order_category' => 'Add_Date DESC,Title',

This is in ConfigData.pm. I think that this will do the trick, sorting by date first and then by Title (alphabetically). If you want the same sorting on your Cool, New, and Search pages, you need to change:

build_sort_order_new
build_sort_order_search
build_sort_order_search_cat
build_sort_order_cool

As for #2, it looks as though your templates are set probably for 100% table widths. Check category.html for this, and try to fiddle with the table layout.

I hope this helps.

Quote Reply
Re: Picky Problems: Sort date, categories layout In reply to
But there aren't any table width in category.html :(

It's just building on:


<%if category%>
<h2>Categories:</h2>
<%category%>
<%endif%>

...and I don't know what that's generating HTML against. Wherever it's doing that, it actually looks like it's set for 110%!

I will look at the sort order thing, thanks.

--Bri

Quote Reply
Re: Picky Problems: Sort date, categories layout In reply to
Take a look at the source... does it look like it is the table width that is the problem? If so, you will have to find where the <%categories%> tag is built. I am new to Links SQL2, so I can't help here. I yield to Pugdog et al.

Quote Reply
Re: Picky Problems: Sort date, categories layout In reply to
Nope, it's set for 95% and calling some classes to format the text:

<table border=0 width="95%"><tr><td class="catlist" width="50%" valign="top"> and <span class="descript">

Here's the relevant CSS:

/* This is for Category Listings table cells */
td.catlist {
font-size: 10pt;
color: #000000;
background: #FFFFFF;
font-family: "arial", "helvetica", sans-serif;
}

/* The link description */
span.descript {
font-size: 10pt;
color: #000000;
background: #FFFFFF;
font-family: "arial", "helvetica", sans-serif;
}

Is anyone else having this headache or is it just me??

--Bri

Quote Reply
Re: Picky Problems: Sort date, categories layout In reply to
No, I don't have any problem with horizontal scrollbars. Maybe check the style sheet for margins that might be making it too wide. Like if there is also a <p> margin or a <DIV> margin set.