Help - Search - Members - Calendar
Full Version: Help needed on category archiving
Movable Type Community Forum > Additional Resources > Tips and Tricks
RheaW
Hi!

I've just installed MT and I need some help on creating links to individual entry pages under the category archives. My problem is, when I try to list the entries under a certain category, they all point to my index page instead of the entries themselves. For a clearer picture, here's the link to my main archive page:

http://blueskies.sunflower-secrets.net/archives.html

I'm a newbie at MT templates and I've used this code from one of the posts here:

CODE
<MTCategories>
<$MTCategoryLabel$><br>
<div class="side">
<MTEntries lastn="20">
  <a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a><br>
</MTEntries>
<br>
</div>  
</MTCategories>


Please help.
kadyellebee
What version of MT are you using?  MTEntryPermalink was added in 2.5, so if you have an earlier version, you might try using MTEntryLink instead smile.gif

Kristine
RheaW
Thank you so much! =)

Here's one more question: Is it possible for me to display the date the entry is written too (I mean, together with the links to individual entry pages in the category archive)?
kadyellebee
Yep!  Add MTEntryDate into the MTEntries container and the date will show up smile.gif  You may need to use the date format section in the manual to see the options of how the date will display.

Kristine
RheaW
Argh... It still doesn't show up... Please help...

CODE
<MTCategories>
<$MTCategoryLabel$><br>
<div class="side">
<MTEntries lastn="50">
  <$MTEntryDate="%e %b %Y"$><a href="<$MTEntryLink$>"><$MTEntryTitle$></a><br>
</MTEntries>
<br>
</div>  
</MTCategories>
RheaW
Alright, I'm being an idiot again. I've figured it out. ^^;
girlie
If you want to only show entries from a particular category (which is what you indicated in your first post), the code should look like this:

CODE
<MTEntries category="category_name" lastn="50">
 <$MTEntryDate="%e %b %Y"$><a href="<$MTEntryLink$>"><$MTEntryTitle$></a><br>
</MTEntries>


But - if you're doing this on a category archive page, you don't need to include the category name at all - MT will know that automatically by the type of archive it is.

As for MTCategories - that's intended to list all the categories in your blog, not just one.
RheaW
Thanks a lot! =)

Oh, girlie, I have to say that I love your blog on MT features. =) It's wonderfully designed. =)
girlie
Thank you!  :)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.