Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-04-04 22:10:20

zeusdidit
Member
Registered: 2007-10-16
Posts: 111

next and previous related articles by category

I’m attempting to use TXP to change the <txp:next_title /> so it just returns links to articles in the same category rather than by time.

Any idea how this can be done?

Many thanks,
Zeus

Offline

#2 2012-04-04 23:36:33

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: next and previous related articles by category

zeusdidit wrote:

Any idea how this can be done?

As far as I know this will be possible in the next version (or using SVN: even right now).

Re doing it right now in 4.4.1:
I didn’t find the patience to look through Gil’s code here. It’s from the topic I already linked above about changing prev/next’s behavior, so might be usable for you (edit: with some changes).

Last edited by uli (2012-04-04 23:37:46)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2012-04-05 00:42:32

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

Re: next and previous related articles by category

uli wrote:

As far as I know this will be possible in the next version

Zeus is asking for filtering/limiting results to single category. Which isn’t what the change and the issue you are linking is about. The change is about result sorting. Prior to r3585, next and previous ID were always selected based on posting date, despite the sorting criteria.

(or using SVN: even right now).

As of now, the change is just for the core library function, and doesn’t yet affect navigation or article lists generated with TXP tags. Still work in progress. For now, the change is only accessible by developers, but will be will be implemented in the tags no doubt at some point in the future.

Offline

#4 2012-04-05 08:05:56

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,001
Website GitHub

Re: next and previous related articles by category

would smd_horizon help?


TXP Builders – finely-crafted code, design and txp

Online

#5 2012-04-06 21:02:04

zeusdidit
Member
Registered: 2007-10-16
Posts: 111

Re: next and previous related articles by category

I am going to try smd_horizon.

Uli,
Gocom is right. I went through that one post thinking it would be a solution.
What I’d LOVE to get is this:

Like I said, I’ll report back after trying smd_horizon.

Thanks!

Offline

Board footer

Powered by FluxBB