Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#25 2012-10-05 07:32:09
- feragnoli
- Member
- From: the hague
- Registered: 2005-02-10
- Posts: 150
Re: r3847: link_to_prev and link_to_next adhere to a custom sort order
I see.
but, wouldn’t you agree that that’s somewhat inconsistent. and a limitation too?
the whole section/categories classification is still pretty unclear (it is clear what they ARE but not why).
in my experience, for instance, it is often desirable not to have clients mess with sections.
example:
the content of the site might be organized in two main sections: News and About us
The section ‘News’ will in turn include a number of categories (sport, whatever, …) and it is reasonable to foresee that paging through articles (from an individual article page), in such a case, will happen also by category.
That very simple task is, at the moment, a very tricky one..!
Thank you
what was that again…?
Offline
Re: r3847: link_to_prev and link_to_next adhere to a custom sort order
feragnoli wrote:
but, wouldn’t you agree that that’s somewhat inconsistent. and a limitation too?
It is. Alas, the alternate solution has its own deficiencies. We’re in a “rock vs. hard place” situation.
Offline
#27 2012-10-05 08:18:09
- feragnoli
- Member
- From: the hague
- Registered: 2005-02-10
- Posts: 150
Re: r3847: link_to_prev and link_to_next adhere to a custom sort order
I am not aware of the way link_to_prev and _next work at the moment (I have indeed read the post about the sorting defined by the <txp:article /> tag).
Ideally, one would want an attribute like restrict=“category1” or the such on those tags.
The option I can think of right now, otherwise, is to call the database and ask:
select rows where timestamp is immediately above or immediately below the timestamp of current article (in case of a sorting by date).
I guess that’s a whole different way than the one link_to_prev and _next work at the moment, is it?
thank you
what was that again…?
Offline
Re: r3847: link_to_prev and link_to_next adhere to a custom sort order
feragnoli wrote:
select rows where timestamp is immediately above or immediately below the timestamp of current article (in case of a sorting by date).
I guess that’s a whole different way than the one link_to_prev and _next work at the moment, is it?
Basically it works like that. Look at getNeighbour for details.
Offline