tips and tricks for movable type
per-category individual entry archive templates
October 16, 2004
Stepan Riha showed us how to have Per-Category Templates for Category Archives. You can do the same thing for Individual Entry Archives, you just need a different plugin.
Install the Compare plugin.
Create a separate Template Module for each category which contains the appropriate content and template code you want for entries in that particular category.
Replace your existing Individual Entry Archive template with code similar to this (substituting your own category names, of course):
<MTInclude module="Apples">
</MTIfEqual>
<MTIfEqual a="[MTEntryCategory]" b="Bananas">
<MTInclude module="Bananas">
</MTIfEqual>
<MTIfEqual a="[MTEntryCategory]" b="Oranges">
<MTInclude module="Oranges">
</MTIfEqual>
Save and rebuild Individual Archives.
TrackBack: 3
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/206)
» links for 2004-11-04
Excerpt: [the girlie matters] tips and tricks: per-category individual entry archive templates using movable type to create separate looks for...
Weblog: Blog-Her Links
Tracked: 11.04.04 01:16 PM
» Link Dump
Excerpt: I'm well behind on my blog reading and have about 2000 unread entries in Feeddemon that I'll get to at some point. Meanwhile, I have a pile of links in...
Weblog: UtterlyBoring.com
Tracked: 11.10.04 09:28 PM
» Compare Values Plugin - Hooray!
Excerpt: Often times one wants to create a different display based on the value of certain Movable Type tags. Implementing these types of behaviors often dictated a more complex approach using various combinations of php and javascript. However, as Kevin Shay...
Weblog: Movable Type Topics
Tracked: 12.07.05 07:11 PM
Comments
Hi Shelley, great tip. Question, could you use this with specific authors as well? For example,
<MTIfEqual a="[MTEntryAuthor]" b="Joe">
<MTInclude module="Joe">
</MTIfEqual>
I don't see why not. I would think you could pretty much use this for any MTEntry* tag.
It seems to work fine If I don't have any subcategories for my entry, but as soon as I have subcategories, it doesn't work anymore and returns an empty page.
Any idea?