Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-02 12:26:40

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Custom field sorting

I have popularity plugin dzd_counter_view. It makes +1 to the custom_field_2 every view. It works well, but when i want to sort the list of articles like this:

<txp:article_custom section="article" sort="custom_2 desc" listform="test_custom_field_sort" limit="50" />

I have this output:

Article ID=72 - custom_field name="countxx"=9 
Article ID=86 - custom_field name="countxx"=9 
Article ID=87 - custom_field name="countxx"=9 
Article ID=89 - custom_field name="countxx"=9 
Article ID=189 - custom_field name="countxx"=9 
Article ID=190 - custom_field name="countxx"=9 
Article ID=24 - custom_field name="countxx"=7 
Article ID=85 - custom_field name="countxx"=7 
Article ID=191 - custom_field name="countxx"=7 
Article ID=194 - custom_field name="countxx"=7 
Article ID=84 - custom_field name="countxx"=6 
Article ID=160 - custom_field name="countxx"=6 
Article ID=192 - custom_field name="countxx"=6 
Article ID=193 - custom_field name="countxx"=6 
Article ID=195 - custom_field name="countxx"=6 
Article ID=32 - custom_field name="countxx"=5 
Article ID=35 - custom_field name="countxx"=5 
Article ID=243 - custom_field name="countxx"=4 
Article ID=170 - custom_field name="countxx"=32 
Article ID=30 - custom_field name="countxx"=27 
Article ID=34 - custom_field name="countxx"=22 
Article ID=14 - custom_field name="countxx"=20 
Article ID=70 - custom_field name="countxx"=19 
Article ID=29 - custom_field name="countxx"=18 
Article ID=234 - custom_field name="countxx"=18 
Article ID=171 - custom_field name="countxx"=17 
Article ID=33 - custom_field name="countxx"=16 
Article ID=135 - custom_field name="countxx"=16 
Article ID=161 - custom_field name="countxx"=16 
Article ID=196 - custom_field name="countxx"=16 
Article ID=36 - custom_field name="countxx"=15 
Article ID=90 - custom_field name="countxx"=15 
Article ID=131 - custom_field name="countxx"=15 
Article ID=26 - custom_field name="countxx"=14 
Article ID=23 - custom_field name="countxx"=13 
Article ID=163 - custom_field name="countxx"=13 
Article ID=31 - custom_field name="countxx"=12 
Article ID=91 - custom_field name="countxx"=12 
Article ID=28 - custom_field name="countxx"=11 
Article ID=13 - custom_field name="countxx"=10 
Article ID=21 - custom_field name="countxx"=10 
Article ID=22 - custom_field name="countxx"=10 
Article ID=132 - custom_field name="countxx"=10

Visit this special page to see “in action” the work of sorting. At the first sight it seems to be similar to the Windwos Explorer’s sorting…

Is this bug fixable?

P.S. test_custom_field_sort form listing:

<a href="<txp:permlink />">
Article ID=<txp:article_id />
</a> - custom_field name="countxx"=<txp:custom_field name="countxx" />
<br />

(Edit: updated discussion topic. -Mary)

Last edited by Mary (2008-02-04 03:02:36)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#2 2008-02-02 12:51:31

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Custom field sorting

Try using: sort="custom_2 + 0 desc"

Offline

#3 2008-02-02 13:13:56

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Custom field sorting

It works! Thanks ruud!


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

Board footer

Powered by FluxBB