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

colophon ( 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?実?気?入ら??所????。 新?エントリ?????や?更新?カテ…

 
Trackback by ?ょ??ニュース #
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 AtBGCg #
2005-04-09 23:20:07

JeS̑ŐL𕎦

?@Movable Typeł͑ŐL𕎦邱Ƃ?o܂?AJeS̑ŐL𕎦邱Ƃ?o܂?B?ÃvOCCXg?[܂?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