Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-10-13 23:40:29

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

Edit: Can I link to a previous category?

I have a site (an online academic journal – www.mediationsjournal.org) in which each issue number is a category – such the category with title Vol 23, No 1 (name 23_1). I am using graeme’s awesome gbp_permanent_links plugin to use urls like /category/section/title. I would like to link to the previous issue by linking to the previous category. For example, if I’m looking at an article in Volume 23, Number 2, I would like to have a link that goes to Volume 23, Number 1, which would be I think www.mediationsjournal.org/23_1/articles. Is this doable? Will it require some php in my page? The categories will, I think, be naturally in chronological (correct) order, since they seem to be ordered by name.

Thank you in advance for any tips!

Last edited by nabrown78 (2008-10-14 03:40:34)

Offline

#2 2008-10-19 22:13:06

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

Re: Edit: Can I link to a previous category?

The only thing I can think of (but it requires filling yet another field for each article) is using a custom field for the previous category, e.g. ‘prev-cat’. So for articles in category 23_2 you enter 23_1 in that custom field, et cetera. You could then create a link like this in your article form:

<a href="<txp:site_url /><txp:custom_field name="prev-cat" />/articles/">Previous Issue</a>

Last edited by els (2008-10-19 22:14:32)

Offline

Board footer

Powered by FluxBB