Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-22 16:16:38

sethexis
Member
Registered: 2008-04-16
Posts: 10

link to previous/next in same category

masa’s post about sorting previous/next by article title made me wonder if there’s any way to contextually sort articles based on category.

if you click a link for mysite.com/section/?c=category1 and you have the section page set up to display articles one at a time, is there a way to generate previous/next links that will adhere to the ?c=category1 specification that generates a section page showing the first article of category1 so that all other links will be to articles in category1 until a call to mysite.com/section/?c=category2 or some other category is issued?

Offline

#2 2008-04-22 16:46:04

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

Re: link to previous/next in same category

Have you tried using the Newer/Older tags?

Offline

#3 2008-04-22 20:38:51

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: link to previous/next in same category

Asking almost same thing; if I’m in article page (not article listing page), can I provide links to prev and next in same “category1” as current article? Now I have “browse articles from same category link”, which opens category list page, but with that link I’d like to have next/prev straight inside article.

Offline

#4 2008-04-22 21:22:59

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

Re: link to previous/next in same category

Maybe jk_neighbour is for you.


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

Offline

#5 2008-04-22 21:23:10

sethexis
Member
Registered: 2008-04-16
Posts: 10

Re: link to previous/next in same category

ruud wrote:

Have you tried using the Newer/Older tags?

yes. i tried that. the next/previous links just call whatever articles are next in the same section—ignoring category.

Offline

#6 2008-04-22 21:26:34

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

Re: link to previous/next in same category


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

Offline

#7 2008-04-22 23:01:42

sethexis
Member
Registered: 2008-04-16
Posts: 10

Re: link to previous/next in same category

Super! That worked perfectly. Thanks so much.

Offline

#8 2008-04-22 23:51:09

sethexis
Member
Registered: 2008-04-16
Posts: 10

Re: link to previous/next in same category

actually, is there a hack of that plugin that uses the category info created by rss_unlimited_categories instead of category1?

Offline

#9 2008-04-23 00:01:02

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

Re: link to previous/next in same category


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

Offline

#10 2008-05-26 16:23:51

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: link to previous/next in same category

Is there any other way to do this, cause I need to limit filtering to category2 only, so jk_neighbour doesn’t work. I would need to link to previous & next articles whose category2 matches to the current article.

Offline

#11 2008-05-26 16:54:17

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

Re: link to previous/next in same category

Hm, haven’t tried jra_links yet, but sort="custom_7,LastMod desc" sounds as if category2 might be possible.


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

Offline

#12 2008-05-26 19:55:55

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: link to previous/next in same category

Hmm…, I already had that plugin for other purpose, and immedeately tested for this. But no, it seems doing only sorting by cat. – not filtering like with sections, and that’s what I would need.

Offline

Board footer

Powered by FluxBB