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 the dynamic publishing system. So announcing PHP PreviousNextInCategory. There are two files in the zip file that will need to be uploaded to the php/plugins/ directory. The two files will provide the container tags <MTEntryPreviousInCategory> and <MTEntryNextInCategory> exactly like the perl version and are to be used in exactly the same way eg

<MTEntryPreviousInCategory>
<a href="<$MTEntryPermalink$>">&laquo; <$MTEntryTitle$></a> |</MTEntryPreviousInCategory><br />
<a href="<$MTEntryPermalink archive_type="Category"$>"><$MTEntryCategory$></a><br />
<MTEntryNextInCategory>
| <a href="<$MTEntryPermalink$>"><$MTEntryTitle$> &raquo;</a>
</MTEntryNextInCategory>

The plugin can be downloaded here. For those interested, the PHP files are more or less the PHP files for <MTEntryPrevious> and <MTEntryNext> with just code slotted in to check the category.

2 Comments

Matthias said:
on Jul 12, 2005 2:10 AM | Reply

great stuff, just saved my night. thanks!!! and greetings from munich :)

matthias

mjulius said:
on Nov 26, 2005 3:09 AM | Reply

Have no idea where this plugin is listed in the Plugins Forums (searching yielded nothing) but I don't understand some apparently signifigant essentials. I converted the site to dynamic publuishing, placed the plugins in the PHP directory (though they were never listed in the plugin directory of the site - no word from MT whether this is right or not - it does list the others with the .pl extension) but didn't bark at me when I rebuilt the site. However the previous and next do not infact move the site back and forth through the category. The link simply points to it's own page. Also noticed when I looked at the source that the closing tag was listed which isn't right. I have looked at the code and it mentions the smarty engine. Do I have to download and install all that?

Leave a comment

Preview