March 7, 2006
This article reprinted from the the TypePad Hacks Weblog. The original article can be found online:
© 2008, John T Unger
Let's start with a pretty easy hack that's also quite useful: Drop down menus for categories and archives. I found this hack at Colleen's blog. I've simplified her instructions a bit to make this easy, but you might want to read her post to see how she applied styles to the menus.
Drop down menus are a great hack that probably ought to be a standard form of Typelist. Currently you can only do this if you have a pro account and can alter your template code. Aside from making navigation easier and saving space in your sidebar, there's another thing I really like about these menus— they allow you to make your full archives available in an obvious way. If you've been blogging for over ten months, you may have noticed that the standard TypePad list for archives
is limited to displaying only ten months. I find this annoying for two reasons: it makes it harder for readers to find older entries and it obscures the fact that you've been blogging for a longer period of time. I do take bloggers more seriously when I can see that they've been at it for over a year, and I doubt I'm alone in that. It turns out that the archives title is a link to an automatically generated page which has links to the full archives, but I don't think that is very clear… I would never have figured that out if Typepad Tech support hadn't told me.
If you look near the top of the sidebar in this blog, you can see how the menus look. Click on the extended post link for full instructions and easy cut+paste code.
To Make drop down archive menus follow these steps. You must have a TypePad Pro account and be using advanced templates in order to use this hack.
1. Go to your design tab for the blog you want to add drop down menus to.
2. Click the template for your sidebar. If you have more than two columns, make sure you choose the correct sidebar template.
3. Copy your existing code and paste it into a text document in case you make a mistake and need to start from scratch. This is always recommended when you alter template code.
4. find the typelist in which you want to insert your archives. It will look something like this:
Actually, you will be inserting the menu between Typelists… I don't think there is a way to position it in the middle of an existing Typelist. Because it has no header/headline, it will show up at the bottom of the list above it as though it were part of that list.
5. Insert the follwing code, verbatim:
<select style="width:150px; margin: 0px 0px 10px 5px; font-family: verdana, Arial, sans-serif; font-size: 11px;" onChange="document.location=options[selectedIndex].value;">
<option value="">archives by month</option>
<select style="width:150px; margin: 0px 0px 10px 5px;
font-family: verdana, Arial, sans-serif; font-size: 11px;"
<option value="">archives by category</option>
<option value="<$MTArchiveLink$>"><$MTArchiveTitle$> (<$MTArchiveCount$>)</option>
6. click "save" then "publish."
7. Reload your blog. You should now have menus. Yay!
You don't have to do menus for both sets of archives if you only want one. You can choose one or the other by selecting just one of the code paragraphs above.