tips and tricks for movable type

entries by category in individual archives (revisited)
April 06, 2002

As Kristine pointed out to me in this Community Forum topic, a much easier way to do this is with Movable Type v2.0's new multiple template feature.

Untested thought process here:

1) Instead of creating new INDEX templates, create a new Category Archive Template which merely lists the entries in the category, rather than the content of those entries:

<MTEntries>
<a href="<MTEntryLink>"><MTEntryTitle></a>
</MTEntries>

2) In Archiving under Blog Configuration, ADD the new template you just created as a Category Archive type.

3) Set the Archive File Template for your new template:

<MTArchiveCategory dirify="1">.html

4) Include your file with SSI in your Individual Entry Archive Template:

<!--#include virtual="<MTEntryCategory dirify="1">.html"-->

Comments

this is a wonderful tip! it worked perfectly... now i don't have to create a new index every time i create a new category. this rocks! :-)

by brenmae | 04.11.02 11:43 PM

Sweet! Glad to hear it worked for you! =)

by girlie | 04.15.02 06:55 PM

how does this work?

i have an elaborate individual entry template. in this, i "include" (using php) the dirified template.

but now, all my files (individual, category) etc have nothing but this listing!!! what am i missing?

by craig | 06.02.03 09:16 PM

Thanks for this - I finally got it working.

A note to anyone else... if you put your individual archives into folders per category, then remember that you might need to add "../" to the beginning of your ssi url!

by atlass | 07.06.03 02:08 PM

Interesting tip. Have you gotten this to work without using SSI? I've tried using <$MTInclude file="....."$> but it errors out.

by Mark Mascolino | 01.12.04 01:22 AM

If you're trying to use <MTEntryCategory> inside the <MTInclude> tag, no, that won't work. MT Tags cannot be nested that way.

Also, please don't subscribe to comments on my site again with an email address that asks me to provide confirmation to your Spam Killer program before you can get the notification. =(

by girlie | 01.12.04 07:08 PM

Sorry about that. I have found that the RelatedEntries plugin does what I intented without using SSI although it is limited to the primary category.

by Mark Mascolino | 01.22.04 11:25 PM

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

TrackBack: 0
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/24)