Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-10-07 13:52:31

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#2 2009-10-07 14:46:04

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

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

#3 2009-10-07 14:55:34

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#4 2009-10-07 14:56:08

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2009-10-08 09:07:35

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

Re: Rename "newer" and "older"

My bad. Still, the same thing applies.

Offline

#6 2009-10-09 14:51:26

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#7 2009-10-09 18:22:00

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

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

#8 2009-10-09 19:32:19

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Rename "newer" and "older"

Noted, thanks.

Suggestion amended to “next_page” and “prev_page”.


Code is topiary

Offline

#9 2009-10-09 19:40:42

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Rename "newer" and "older"

ruud wrote:

For backwards compatibility, changing tag names isn’t a good idea.

+1 for keeping current tag names.

Offline

Board footer

Powered by FluxBB