tips and tricks for movable type
category archives listing
March 26, 2003
I received an email from a reader named Chris who wanted to know the code to use for listing category archives (as I do in my sidebar). My reply to him keeps bouncing, so I'm posting the code here instead.
<a href="<$MTArchiveLink$>"><$MTArchiveTitle$> (<MTArchiveCount>)</a><br />
</MTArchiveList>
TrackBack: 4
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/144)
» Category Entry Count
Excerpt: Another great tip from Girlie. This will list the categories along with how many entries are in each. I combined it with my floating title thing that tells you what the category description is, so the code actually looks like...
Weblog: The After Hours Pub
Tracked: 04.20.03 12:21 AM
» Fancy Web Stuff
Excerpt: So, I have been suffering from Plugin Mania(TM) and have installed and run tons of them in the past month. Thing is, they didn't always work. All of them do now, though. :smile: For a quick re-cap: First I installed...
Weblog: Dark Star
Tracked: 07.23.03 09:37 PM
» girlie matters
Excerpt: link3...
Weblog: habeo
Tracked: 09.26.03 11:27 AM
» Category Links Added!
Excerpt: Many thanks to Girlie's MT category archives listing tips, I was able to add category links on this page. Category titles will still change as days pass by. There is primary and category attributes that I must consider next time....
Weblog: Laila's Weblog - A Journey Through Life
Tracked: 12.28.03 09:17 AM
Comments
Hrm, I tried this now, and it just links the catagories to a catagory.html file. How do I make it so the "archives by catagory" link will be serperate links such as rant.html worship.html, etc. Thanks. =)
Then it sounds like you've got a problem with the naming of your files. Do you have anything in the Archive File Template field for your Category Archives? (That's on the Blog Configuration | Archiving screen.)
hrm, well I've been fooling around now with a few of the entries you have (great site, tons of info! whoo), and now I have it so the catagories listings are linking to rant.html and worship.html (or any other catagories I make). BUT, I don't have such files as rant.html or worship.html.... trying to figure that one out now, lol
My archiving configuration of Catagories is linking to catarchive.html, which contains ">
In the body. It does have stuff above that and everything else too.
So, you have "catarchive.html" in the Archive File Template field? That means every category page is being generated to that one file (and each overwriting the one before it).
You need something like <MTArchiveCategory dirify="1">.html in there instead.
ahh, that makes sense. =) cool, should work now, thank you so much. =)
Hey girlie.. one simple question, at which perusing the MT docs hasn't answered. I have the catagories link set up on my index.html, but when you click on a catagory link, it is a blank page.
It has to be something simple.
ahhhhhhhh thankyouthankyouverymuch!! I have been looking for this dang tag all over creation. =)
Is there any way you can post the coding to get the 'list all' count (total) as in your archives and categories? Is it the same as (<MTArchiveCount>) in some way?
Thank you very much for your help! :)
What I'd like to know is how you get the title of the entry into the Permanent URL for it. Like so:
instead of something like:
Appreciate any help.
Casey - It's <MTBlogEntryCount>.
John - Look in the MT Users Manual under Archive File Templates.
Thank you Shelley! :)
?
What a great tag for archiving by category...thanks for posting it, Girly.
Girlie!!! =))). That little piece of code is from MT manual, i used it, but i get a duplicated index!. Check for yourself!
http://gazblog.f2o.org/DuplicatedCat.jpg
=)
Would it be possible to keep only posts I classify as for the front page to be ever posted there and all the other posts I make to go directly into an archived catagory?
In my main index in 2.63, this returns:
Build error in template 'Main Index': Error in tag: The archive type specified in MTArchiveList ('Category') is not one of the chosen archive types in your blog configuration.
The error message tells you exactly what the problem is - you don't have Category Archives selected as one of the options in Blog Configuration | Archiving.
So turn 'em on. =)
Thanks for all the resources you offer here. Even a MT newbie like me can do some nifty stuff with your help on these pages!
I'm on a roll today. Your stuf is helping me left and right :). I really appreciate it too!
Just building my mt site. Is there a way to create a popup navbar listing all categories. More importantly, can anything be done to supress certain categories from appearing as well (I'd like to split up the menubar selection into two separate categories of archives).
Thanks a million, your script on Catergory Archiving solved a 3 day headache for me. You're a saviour...
Hi. I've made the archive links on my index page look the way I want, but when I click on "August" for example I get all the August entries, but I want a list with links & dates to all the August entries... How do I do that? .....
And how do I do the same thing on the category pages?
I'm having trouble finding the tags or algorithm of tags that allows me to show the archives in a single category rather than all the categories. thanks for any help in advance and i sincerely enjoy your site.
This is most useful. Simple, Elegant.
When I try to archive by category (using the <MTArchiveCategory dirify="1">.html) in my Category Archive File Template, I get the following errors anytime I try to post:
Renaming tempfile '/homepages/13/d90422984/htdocs/mt/archives/.new' failed: Renaming '/homepages/13/d90422984/htdocs/mt/archives/.new' to '/homepages/13/d90422984/htdocs/mt/archives/' failed: Not a directory
I can't tell what's trying to create the '.new" file. Any ideas would be greatly appreciated...
Thanks,
Shawn
Hmmm. Do you have any entries which have not been assigned to a category?
Not that I can tell. If I delete all the entries, the rebuild goes fine. As asoon as I add one entry, I get the '.new" error.
In the "Rebuild" ialog box, the following shows up under the two error messages...
"MT::App::CMS=HASH(0x837b5c8) Use of uninitialized value in concatenation (.) or string at /homepages/13/d90422984/htdocs/mt/extlib/File/Spec/Unix.pm line 78."
hmmm.
It will show all entries in those categories. but I want to show entries sorted by category under specific month.(it means monthly archive)
how can i do that?
Thank you so much! I've been looking all over for this code. Your web page has been really helpful for me as a beginner with Movable Type.
I find more great stuff on your site when I'm not even looking for it.
Thanks, Gary
First off, thanks for all your help! Your site is terrific.
I've been searching for this particular feature for what seems like ages.
Anyway here's the site I'm working on and I'd like my leftnav to reflect your sidebar. I think this code snippet is going to come in handy, I'll keep you posted on how it goes.
Hmm, the code's not working for me. I'd typically like my site's left nav to be a lot like your sidebar; with the entries for each category in a bulleted list, under the main category heading.
How do I do that?
I figured it out. A few tweaks was what it needed.
I think I was stuck with the MTCategoryOfArchive plugin that I had downloaded. I couldn't figure out how to customize it to achieve the look I wanted.
Thanks for your wonderful tip!
I am gettin the same error as mice is:
Renaming tempfile '/homepages/13/d90422984/htdocs/mt/archives/.new' failed: Renaming '/homepages/13/d90422984/htdocs/mt/archives/.new' to '/homepages/13/d90422984/htdocs/mt/archives/' failed: Not a directory
I am trying to add categories and I get that error. I did what girlie did, deleted the existing categories, made new ones, rebuilt and everything was fine until I tried to add posts to it and that above error returned.
Has anyone figured it out yet?
I figured it out. If you have a category with more than one word you need to use an underscore instead of a space.
ALSO
The default archive file template did not work, I got it to work using this:
/index.html
Hopefully this will help a few peeps.
Tim
Thanks girlie for helping dummies (like me) :)
Tim, thank you very much. i just had the same kind of trouble, but with your help i worked my problem out.
This rocked - thanks so much! I was looking everywhere for this script!!
I used this piece of code for two of my blogs.
The first it worked with (http://reviewzoo.rapturepress.com)
The 2nd nothing changed. (http://rp.rapturepress.com)
Any ideas on what I did wrong?