Previous and next in category

I’m not sure how generally useful this is, but if you need it, it may be close to what you need. PreviousNextInCategory is a plugin that adds two container tags, <MTEntryPreviousInCategory> and <MTEntryNextInCategory> that work just like the <MTEntryPrevious> and <MTEntryNext> tags, except that they give you the previous and next entries that are in the same category as the primary category of the current entry.

Which is where things can get a little weird: if you have a previous entry that has the primary category Food, but the secondary category Sex, then as you browse backward through Sex entries, when you hit that Food entry (because it’s also Sex), you’ll suddenly switch over to browsing Food instead of Sex. So it’s probably most useful for something like the original problem, where you only have a few distinct categories, or for people like me who rarely remember to add more than one category.

In any case, I’ll probably leave it doubled up with the by-date links on my archives until I get tired of seeing it. One other thing it might be good for, displayed the way I have it: it encourages you to write about a variety of things, since it looks rather stupid when the previous and next entries by category are also the previous and next entries by date, giving you two lines of the exact same links.

90 Comments

Comment by jespes #
2005-03-13 11:56:34

Hello,
This is a terrific idea, thank you.

Unfortunately… I can’t get it to work. Both MTEntryPreviousInCategory and MTEntryNextInCategory call the current page. (EG if I’m viewing page ”archive-page-15,” both codes simply call that page over and over, instead of going to 14 or 16.)

I’ve backed all the way out and tested in the original, unmodified ”individual archive template” that comes with MT. The two codes do the same thing for me there.

Have you ever heard of this problem? I’m using MT 3.15.

Many thanks, best regards,
JP

 
Comment by Mushlette #
2005-03-31 09:54:17

I just hadda say that the COMMENTS ON THIS POST ARE HYSTERICAL.

Now I’m off to find a donut.

 
Comment by Joseph #
2005-04-17 18:26:06

THANKS! This was a great help. . .

 
Comment by Chris #
2005-06-16 19:57:56

Your plugin works great! however, I am trying to use it in an another way. What I want is to have two individual templates, the original individual template will have a button on it, and will go though the whole blog by entry. Then I want to create another individual archive template, and name it ”Individual Category template”. When a person clicks on a category, they will get to another individual template.

Here is an example on what I am trying to do

http://www.pixelfight.com/pf/archives/2005/06/000140cat.php

How can I make your plugin go though all the 000***cat.php pages?

Thanks in advance

 
Comment by rmcmahon #
2005-07-08 04:43:11

Wow, I’ve been looking for something like this for a while. It worked great with my older (2.63) version of Movable Type. Thanks!

 
Trackback by MT Plugin Directory #
2004-02-08 01:24:19

PreviousNextInCategory

 
Trackback by Gwen Harlow resources #
2004-02-10 13:17:56

Category navigation

Previous and next within category, formatting buttons

 
Trackback by KO #
2004-02-10 22:56:40

Extending Movabletype

Prev/Next Links within Category Position of Individual Archive in Category List Total Number of Entries in Category i.e Have Entry #x of Total Entries in that category, and previous/next links within category. Usefull for photoblogs….

 
Trackback by Building things #
2004-02-14 14:21:49

Individual archive navigation by category

Requires MySQL and two plugins; other options

 
2004-02-18 18:37:43

Colophon

col·o·phon ( P ) Pronunciation Key (kl-fn, -fn) n. 1. An inscription placed usually at the end of a book, giving facts about its publication. 2. A publisher’s emblem or trademark placed usually on the title page of a…

 
2004-03-27 16:54:27

show the previous and next entry in category

On my individual entry archive page I provide links to the next and previous entries in the category instead of overall. This is particularly important for the way that I have my blog set up, since the three categories (A…

 
Trackback by Learning Movable Type #
2004-04-22 17:38:49

Creating a Photo Album

There are many ways to create a web-based photo album or photoblog in Movable Type. This tutorial addresses just one method for creating a photo album, and is based on the steps I took to create my MT-based photo album….

 
Trackback by Ruby site #
2004-04-24 11:55:41

複数Categoryã?ªãƒšãƒ¼ã‚¸ã‚?ã??ã‚Š

COCOOONS.ORGã?•ã‚“ã?§ã€?Category内ã?§ã?®ãƒšãƒ¼ã‚¸ã‚?ã??ã‚Šã?¨ã?„ã?†ã?®ã‚’見ã?Ÿã€‚ ã??ã?®äººã‚‚ã€?「CONQUE TINT WORKSã?•ã‚“ã?®ã‚¨ãƒ³ãƒˆãƒªã?§ MT(カテゴリ内ã?§ãƒšãƒ¼ã‚¸ã‚?ã??ã‚Š)ã?¨ã?„ã?†ã?®èª­ã‚“ã? ã€?ã?¨ã?‚ã‚‹ã?®ã?§ã?“ーã?—ã?¦ãƒªãƒ³ã‚¯ã?¯ã?¤ã?…

 
Trackback by geek and proud #
2004-04-29 15:25:15

Next and Previous in Category

I just found the Next and Previous in Category MT plugin. Previously, to separate my from the main one, I…

 
Trackback by heimatseeker #
2004-05-05 16:32:52

i witness

Meet i witness, heimatseeker’s very own, brand-spanking new photoblog! I had been exploring for a while how to better accommodate those images that are not than just decoration for blog entries, nor fit into the more instant and immediate, but low-qual…

 
Trackback by Ruby site #
2004-06-05 06:42:02

複数Categoryã?ªãƒšãƒ¼ã‚¸ã‚?ã??ã‚Šã?®å†?構築

「複数Categoryã?ªãƒšãƒ¼ã‚¸ã‚?ã??ã‚Šã€?ã?«ã?¦phil ringnalda dot comã?•ã‚“ã?®ã€?PreviousNextInCategoryを若干改造ã?—ã?¦ä½¿ç”¨ã?—ã?Ÿã?Œãƒ»ãƒ»ãƒ»ã€?1ã?“実ã?¯æ°—ã?«å…¥ã‚‰ã?ªã?„所ã?Œã?‚ã?£ã?Ÿã€‚ æ–°è¦?エントリã?—ã?Ÿã?¨ã??ã‚„ã€?æ›´æ–°ã?§ã‚«ãƒ†ã…

 
2004-08-14 17:30:41

カテゴリー内�後移動リンク作�

��よ��よ�: �一カテゴリー内�記事��後移動

MTã?®å ´å?ˆï½¤æ™®é€šã?«ï½¢è¨˜äº‹ã?®…

 
Trackback by Play with Weblog! #
2004-08-19 21:43:53

カテゴリ内�次・�リンク

å‰?々ã?‹ã‚‰ä¾¿åˆ©ã? ã?ªã?¨æ€?ã?£ã?¦ã?„ã?Ÿã‚«ãƒ†ã‚´ãƒªå†…を渡り歩ã??リンクをã?¤ã?‘ã‚‹ã?“ã?¨ã?«ã?—ã?Ÿã€‚
使ã?†…

 
Trackback by Diary::Weblog #
2004-09-23 04:56:58

�一カテゴリー内�記事��後移動

通常ã€?主è¦?ã?ªBlog・CMSツールã?§ã?‚ã‚Œã?°ã€?「エントリーã?®å‰?後移動ã€?ã?¯å?¯èƒ½ã?ªã‚ˆã?†ã?«ã?ªã?£ã?¦ã?„る。 ã??ã?—ã?¦ã€?MovableTypeã?®å ´å?ˆã€Œå?Œä¸€ã‚«ãƒ†ã‚´ãƒªãƒ¼å†…ã?®è¨˜äº‹ã€?ã?«é™?定ã?—ã?¦ã?®å‰?後移動ã?¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã?§ã?…

 
Trackback by KDC blog #
2004-11-23 02:33:58

MT改造メモ

â– Individual archivesã?§ã??ã?®ã‚«ãƒ†ã‚´ãƒªã?®æœ€æ–°è¨˜äº‹ä¸€è¦§ã‚’表示ã?•ã?›ã‚‹æ–¹æ³•ã€‚ ã?†ã?¡ã?¿ã?Ÿã?„ã?«ã‚«ãƒ†ã‚´ãƒªåˆ¥ã?«ãƒªãƒ³ã‚¯ã‚’è²¼ã?£ã?¦ã?„るサイトã? ã?¨ã€?個別ページã?«é£›ã‚“ã? ã‚‰ã‚„ã?£ã?±ã‚Šã??ã?®ã‚«ãƒ†ã‚´ãƒªå†…ã?®æœ€æ–°è¨˜äº‹ã…

 
Trackback by JimSpot #
2005-01-16 18:35:56

Dynamic Publishing Issues

I’ve been rebuilding the back-end functionality of my blog to where it was before the BlogFucks issues nuked JimSpot. Basically, that means that I’m manually reinstalling the plugins that I had up and running here before. Since the Plugin manager…

 
Trackback by Cordelya #
2005-01-27 19:57:12

Acknowledgements

In the vein of giving credit where credit is due, I give you the Acknowledgements Post. I’ll begin by thanking Six Apart for developing the MovableType software and for offering a free version of it. I would also like to…

 
Trackback by Movalog #
2005-01-31 22:14:08

PHP PreviousNextInCategory

I really liked Phil Rignalda’s PreviousNextInCategory that would basically show the Previous/Next entries in the same category as the current entry (kinda like <MTEntryPrevious> and <MTEntryNext>) Unfortunately this plugin didn’t work under…

 
Trackback by HiLOG #
2005-02-05 15:15:18

�一カテゴリ��後�記事��リンクを表示�自動�構築

 日記ã?®å€‹åˆ¥ãƒšãƒ¼ã‚¸ã?«ã?¯æ¨™æº–ã?®ãƒ†ãƒ³ãƒ—レートã?§å‰?後ã?®è¨˜äº‹ã?¸ã?®ãƒªãƒ³ã‚¯ã?Œè¨­å®šã?•ã‚Œã?¦ã?„ã‚‹ã?Œã€?カテゴリã?«ã‚ˆã?£ã?¦å…¨ã??別ã?®ãƒ†ãƒ¼ãƒžã‚’扱ã?£ã?¦ã?„ã‚‹ã?®ã?§ã€?表示ã?•ã‚Œã‚‹è¨˜äº‹ã‚¿ã‚¤ãƒˆãƒ«ã?«é?•å’Œæ„Ÿã‚’ã?Šã?¼ã?ˆ…

 
Trackback by ƒAƒtƒBƒŠƒGƒCƒg #
2005-04-09 23:20:07

“¯‚¶ƒJƒeƒSƒŠ“à‚Ì‘OŒã‚Ì‹LŽ–‚𕎦

?@Movable Type‚Å‚Í‘OŒã‚Ì‹LŽ–‚𕎦‚³‚¹‚邱‚Æ‚Í?o—ˆ‚Ü‚·‚ª?A“¯‚¶ƒJƒeƒSƒŠ“à‚Ì‘OŒã‚Ì‹LŽ–‚𕎦‚³‚¹‚邱‚Æ‚Í?o—ˆ‚Ü‚¹‚ñ?B‚»‚±‚Å?A‚±‚̃vƒ‰ƒOƒCƒ“‚ðƒCƒ“ƒXƒg?[ƒ‹‚µ‚Ü‚·?Bphil ringnalda dot com: Previous an…

 
2005-05-11 02:22:02

カテゴリ内ã?§ãƒšãƒ¼ã‚¸ã‚?ã??ã‚Šã‚’ã?™ã‚‹

プラグインを使ã?£ã?¦å€‹åˆ¥ãƒšãƒ¼ã‚¸ã?§å?Œä¸€ã‚«ãƒ†ã‚´ãƒªã?¸ã?®å‰?後ナビゲーションを設置ã?™ã‚‹ã€‚PreviousNextInCategoryプラグインã?¯ã??ã?®ã?¾ã?¾ã?§ã?¯ä½¿ã?ˆã?ªã?„ã?®ã?§è¨˜è¿°ã‚’追加ã?™ã‚‹å¿…è¦?ã?Œã?‚る。

 
Trackback by gekka blog #
2005-05-20 01:44:55

�一エントリー内��後�

自分ã?§æ—¥æœ¬ä¸€å‘¨ãƒ„ーリング日記を読ã?¿è¿”ã?—ã?¦ã?„ã?¦ã€?「å‰?ã?®æ—¥ã€?「次ã?®æ—¥ã€?ã?Œè¦‹ã?«ã??ã?‹ã?£ã?Ÿã?®ã?§ã€?プラグインを入れã?¦å¯¾å‡¦ã€‚ phil ringnalda dot com: Previous and next in category ã‚„ã‚Šæ–¹ã?¯ã€? プラグインã…

 
Trackback by Alex | weblog #
2005-05-29 14:05:49

Crear una galeria de imagenes con movable type

Breve explicación de como crear una sencilla galería de imágenes usando Movable Type como software de base.

 
Trackback by danandsherree.com #
2005-09-18 11:15:58

About this Site

danandsherree.com is run with Movable Type, a content management system. The site’s design, Scrapbook, is a ground-up design of XHTML…

 
Comment by Jordan Breckenridge #
2005-11-12 00:43:59

Phil –

Great plugin. I’ve seen it used on several sites and it looks exactly what I’m looking for.

Unfortunately, when I use it on my individual archive page, the ”next” link takes me forward to what seems like an arbitrary entry within the category. The previous/next of a given entry are the same arbitrary entries each time the blog is rebuilt. If I go to the entries that are being ”skipped”, the previous/next on those pages has a similar weird behavior also going to other entries within the category.

The only thing that I think is somewhat unique is the fact that I am using subcategories (assigned as the primary category). Would that make a difference? I’m using MT 3.17 – any help you can provide would be appreciated.

Comment by Phil Ringnalda #
2005-11-12 20:07:09