Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Rename "newer" and "older"
Rename newer
and older
to prev
and next
, respectively. Add newer
and older
as deprecated aliases to prev
and next
.
Why: naming these tags “newer” and “older” only makes sense for lists sorted by some timestamp in descending order. There are plenty of other ways to sort article lists, e.g. score desc
for search results.
Code is topiary
Offline
Re: Rename "newer" and "older"
If you arrive on an individual article page (without following a ‘next’ link) that has a ‘next’ and ‘prev’ link, what does ‘prev’ mean? That never makes sense. At least older/newer makes sense if you’re sorting by timestamp (which is the default). Those that know how to change the default order can also change how the older/newer link is displayed.
Offline
Re: Rename "newer" and "older"
I’m only talking about the older
and newer
tags, which are for article list pages only. I’m not talking about changing what the tags do, only their names.
Code is topiary
Offline
Re: Rename "newer" and "older"
Ruud, not sure if I get your point, but Jeff is talking about older/newer tags for article list pagination, not for individual article browsing (which, by the, to browse individual articles one by one, we rely on link_to_next/link_to_prev, which forces sorting by timestamp).
Offline
Re: Rename "newer" and "older"
My bad. Still, the same thing applies.
Offline
Re: Rename "newer" and "older"
I don’t see how. The actual link text is up to the designer, and would remain so.
Code is topiary
Offline
Re: Rename "newer" and "older"
‘next’ isn’t possible as a tag name, because it conflicts with the PHP function ‘next’.
For backwards compatibility, changing tag names isn’t a good idea.
Offline
Re: Rename "newer" and "older"
Noted, thanks.
Suggestion amended to “next_page” and “prev_page”.
Code is topiary
Offline
Offline