Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Offline
Re: Article sort by category confusion
Bloke wrote #289438:
Can it just become a feature for numeric values only?
I suppose this would get clumsy soon.
In getNeighbour() we have $threshold
as a value to compare against.
Thus you’d need to derive the the comparison operator used in the query depending on the numericalness of $threshold
.
So what do you do if $threshold
is “9”? It might be numeric and as well be from a [0-9A-Z] range spread across all articles.
Offline
Offline
Re: Article sort by category confusion
etc wrote #289443:
Why not to replace
>
by>= AND ID != current_id
?
Because you would eventually end in an infinite loop between two articles sharing an identical sort criterion.
Offline
Re: Article sort by category confusion
wet wrote #289445:
Because you would eventually end in an infinite loop between two articles sharing an identical sort criterion.
Heh! could be a feature 8-) Then > OR (= AND ID>current_id)
, plus ORDER BY sort, ID
?
Edit: then link_to_next/prev
could produce the same result. ID
sort type and direction should be the same as for $sortby
, I guess.
Last edited by etc (2015-03-26 18:22:51)
Offline