Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2005-09-20 02:21:11
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Add a sortby attribute to link_to_next / link_to_prev
The single article navigation tags seem to be hard coded to sequence by the “Posted” field, probably the best choice if it needs to be hard coded. There are circumstances when sequencing by another field might be desirable. <a href=“http://forum.textpattern.com/viewtopic.php?id=11463”>Forum Thread</a>.
I’ve tried hacking publish.php with very little success; so its not so simple as a few little tweaks, but it would be nice to have the option available.
Offline
#2 2005-09-20 04:44:12
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: Add a sortby attribute to link_to_next / link_to_prev
There’s more to this than the next/prev links. article_custom intentionally ignores URLs, so even if the next/prev sequence was correct, the incorrect article would be displayed.
Alex
Offline
#3 2005-09-20 16:55:38
- rsilletti
- Moderator
- From: Spokane WA
- Registered: 2004-04-28
- Posts: 707
Re: Add a sortby attribute to link_to_next / link_to_prev
Knew something didn’t look quite right – Thank zem
Offline
#4 2006-01-17 17:12:03
- Niconemo
- Member
- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
Re: Add a sortby attribute to link_to_next / link_to_prev
Couldn’t – I mean shouldn’t ;) if possible – txp:link_to_next
use the sortby=""
attribute of the txp:article
tag instead of post date ?
I know I’m not the only one having the problem : it’s an issue in every alphabetic sorted sites… as soon as the article list is a bit long, there is no simple way to go to next or previous article.
Nico
Offline
Re: Add a sortby attribute to link_to_next / link_to_prev
I’ve got the same problem. I need link_to_next and link_to_prev to work with txp:article sort=“Title asc”… So I have alphabetical order of articles but link_to_next and prev generate not alphabetical article order :( Could somebody help?
Job: Plugo – tvorba eshopu
Projects: Czech free fonts
Offline
#6 2007-01-24 14:36:58
- Niconemo
- Member
- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
Re: Add a sortby attribute to link_to_next / link_to_prev
Problem still not solved for me
Nico
Offline
Re: Add a sortby attribute to link_to_next / link_to_prev
Hey all. I have had a similar issue. I have whipped up a plugin that does this (and also restricts results to a specific or the current category). I will post it after I have time to test it out a bit more.
Offline
Re: Add a sortby attribute to link_to_next / link_to_prev
I think this is one of the oldest feature ideas for TXP… I remember seeing (and writing) post about this at the gamma stage ^^
Offline
Re: Add a sortby attribute to link_to_next / link_to_prev
Well, here is my go at it: jk_neighbour. Let me know if you find it useful.
Offline