Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2019-01-07 15:49:35

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,246
Website

Re: Next and Prev article Question

Hi Michael, and happy new year.

Nope. Weirdly enough the standard ways do not work outside the article context. Check the thread. Oleg’s solution though is so wonderfully minimal there is no reason to add more lines of code.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#22 2019-01-07 16:47:46

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,173
Website

Re: Next and Prev article Question

Thanks, Colak. and Happy New Year to you.

Somehow I didn’t see all the other replies.

Offline

#23 2019-01-07 17:18:56

etc
Developer
Registered: 2010-11-11
Posts: 3,159
Website

Re: Next and Prev article Question

For the background, the pagination data required by newer/older is set by <txp:article /> tag. Since here we need newer/older tags to be output before <txp:article /> is processed, the “standard” ways can not work. Their behaviour though in this case is different in 4.6 and 4.7:

  • in 4.6, <txp:newer /> outputs nothing;
  • in 4.7, it outputs itself (i.e. <txp:newer /> with eventual attributes) in hope that on the second parser pass the data will be available after encountering a <txp:article /> on the first pass.

Now I leave it with you to explain which result your code will produce in 4.6 and in 4.7 :-)


etc_[ query | search | pagination | date | tree | cache ]

Offline

Board footer

Powered by FluxBB