Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-04-30 20:23:09

agl
New Member
From: Massachusetts
Registered: 2009-03-04
Posts: 3
Website

Next/prev for articles within category

Hi everyone, I’m building a site for a photography magazine. I’ve used a different section for each issue, and category 1 for the photographer’s name. On the individual article page, I’d like to have next/prev link to articles only within the same category (e.g. by the same photographer).

Is this possible? Or, is there a better way to structure my site?

Thanks.

Offline

#2 2009-04-30 20:35:03

jan
Member
From: Utrecht, The Netherlands
Registered: 2006-08-31
Posts: 71
Website

Re: Next/prev for articles within category

I think you should use an article for each issue. This saves you from constantly having to create new sections for issues, and new categories for authors.

The photographer can be a custom field or an article (if there’s more info about the photographer than just the name)

Not sure how to do the prev/next part, but you could alternatively display an article list (in the form of linked titles) with article_custom. You could tell the article_custom tag to query all articles (except the currently viewed article) which have the current photographer’s name as custom field, or refer to an article which has the photographer’s name as its title.


Kensington TXP powered rock

Offline

#3 2009-04-30 20:35:28

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Next/prev for articles within category

Have a look at smd_horizon.

Offline

#4 2009-04-30 22:35:27

jan
Member
From: Utrecht, The Netherlands
Registered: 2006-08-31
Posts: 71
Website

Re: Next/prev for articles within category

Cool, looks useful!


Kensington TXP powered rock

Offline

#5 2009-05-01 02:01:40

agl
New Member
From: Massachusetts
Registered: 2009-03-04
Posts: 3
Website

Re: Next/prev for articles within category

Thanks Els! That looks like it solves my problem.

Also, thanks jan for your suggestion. Custom fields were what I had originally, but I had changed them to categories to save time when creating new articles.

Offline

#6 2009-05-01 07:09:18

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Next/prev for articles within category

Also you can try this Txp Tip

Last edited by the_ghost (2009-05-01 07:19:44)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#7 2009-05-01 07:43:03

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: Next/prev for articles within category

I’ve also used jk_neighbour in the past, works great


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#8 2009-05-01 15:11:31

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Next/prev for articles within category

yeah, smd_horizon is the howitzer I’ve been looking for. It’ll take care of elephants, tanks, city blocks and of course rabbits.

Offline

Board footer

Powered by FluxBB