Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-06-23 21:34:50

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Mix alphabetical and numeric sorting?

Let’s say I have titles like ‘Word 1’, ‘Word 2’, … , ‘Word 25’. I guess the answer is no, but just to be sure: is there any way to sort them so that ‘Word 20’ won’t go after ‘Word 2’? Without using a workaround like ‘Word 01’, ‘Word 02’?

Offline

#2 2010-06-23 22:17:06

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Mix alphabetical and numeric sorting?

Hi Els,

Would a workaround like changing the article url title to word-01, word-02, …, word-20 (while keeping the article titles as you like) and then sorting by article url title be a possible solution?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2010-06-23 22:23:15

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Mix alphabetical and numeric sorting?

Wouldn’t that be a potential field for soo_article_filter after adding a new attribute, repect_numbers: index_ignore= "Word " respect_numbers="yupp"

Maybe after a little Jeff-bedeveling ;)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#4 2010-06-23 22:26:30

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Mix alphabetical and numeric sorting?

Hola Julián! Not a bad idea at all, hadn’t thought about using the url title. I’d use it right away if it was my site, but I’ll have to see what the person who maintains the site thinks of it.

Uli, you lost me ;) I don’t know the plugin but I’ll have a look at it.

Offline

#5 2010-06-23 22:48:04

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Mix alphabetical and numeric sorting?

Hmm… no I don’t think soo_article_filter will work. There are text-only titles before and after ‘Word xx’, so it needs to be in the regular alphabetical order.

I guess I was secretly hoping for an ingenious MySQL query that could handle this… ;)

Offline

#6 2010-06-24 00:08:20

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Mix alphabetical and numeric sorting?

uli wrote:

Maybe after a little Jeff-bedeveling ;)

Bedeviling is right — tricky little problem. I like Julián’s solution best :)


Code is topiary

Offline

Board footer

Powered by FluxBB