How can I list my archives by title? - Blogger help, tips and hacks

How can I list my archives by title?

Note: This article is for classic templates. If your blog is using Layouts, this feature is supported as an option by the archive page element. (Select the "hierarchy" option.)

Ordinarily, archive links point to pages that contain a day, week, or month's worth of posts. However, if you have a lot of posts in each time period, it can be awkward for readers to sort through them all and find the ones that interest them. So some people like to make a title index of their archived posts, where each title will then lead to the full text of the post. That's what we're going to do here. Before we begin, you'll want to make sure that you have post'>http://help.blogger.com/bin/answer.py?answer=732">post pages turned on for your blog, and that all your posts have'>http://help.blogger.com/bin/answer.py?answer=63">have titles . I recommend monthly'>http://help.blogger.com/bin/answer.py?answer=99">monthly archiving so that you can fit more titles on a page, but you can use whatever setting you want for that.

As you probably know, there is a large portion of your template in between a <Blogger> tag and a </Blogger> tag. This is the part of your template that prints out all your posts. We're going to be copying this chunk of code and moving it around, but we aren't going to change its contents. So to keep these instructions simple, I'm going to refer to this whole section as <Blogger>...</Blogger> . Anywhere you see that line in these examples, you'll replace it with the entire <Blogger> section of your template.

The magic of this hack comes from our conditional'>http://help.blogger.com/bin/answer.py?answer=742">conditional tags . We're going to use these tags to show different content depending on what kind of a page we're on. The main page of your blog will contain the posts as usual, since that's where people go to check for updates. And the post pages will be normal, as well, since permalinks will point to them. So those parts are easy. Just replace the <Blogger>...</Blogger> part of your template with:

<MainPage> <Blogger>...</Blogger> </MainPage>
<ItemPage> <Blogger>...</Blogger> </ItemPage>

Note that the same code is in there twice, once for the main page and once for the item page. It's a little bit inefficient, but necessary since there isn't a conditional tag that will let you specify "main OR item page".

The archive page is where things get interesting. Instead of printing out the entire post, with date and time and author's name and all that other information, we're only going to display the titles. Each title will link to the permalink, which is the post page, where the full text of the post is displayed. Here's what the code looks like:

<ArchivePage>
<Blogger>
<BlogItemTitle>
<a href="<$BlogItemPermalinkURL$>"><$BlogItemTitle$></a>
<br />
</BlogItemTitle>
</Blogger>
</ArchivePage>

You can copy this code in directly, without having to substitute anything in, though you're welcome to modify it, or add some formatting, if you wish.

Now, when you click on one of your archive links, you'll see a list of your titles, like this:

Did you like this article ?
Subscribe to my RSS feed and get more blogging tips, Plus a lot more great advice to help your blog.

Related Posts by Categories



Widget by John
  1. 0 comments: Responses to “ How can I list my archives by title? ”

 

 Subscribe in a reader

Latest Free Blogger Templates
Template 01 Template - 02 see more templates
demo - 01 demo - 02
Click here for Demo Click here for Demo How to Installed Tips
Download the Temp01 Download the Temp-2  

Blogger Help: Recent Comments

SUBSCRIBE TO BLOGGER HELP

 Subscribe to Bloggers Help via RSS
Add to Technorati Favorites