Blogger Unofficial FAQ blog

The blog formerly known as Blogger archive/template troubles, featuring
fixes for problems with Blogger's archives, templates, and more

Archives - Switching between included and separate

So you found a template you like, but it includes the archive links in the main page and you want a separate archive index page, or vice versa. Here's how to switch between the two archive link styles.

Included to separate

If you want to switch from including the links in the main page to a separate page, first, replace the line in your main template that includes the links (<script type="text/javascript" src="<$BlogArchiveFileName$>"></script>) with a link to your archives. Because this link has to work both in your main directory and in your archives directory, it should be either an absolute url (starting with http://, e.g.
<a href="<$BlogArchiveFileName$>">Archives</a>) or at least a server-rooted url (starting with a slash, and listing the path from the server's root directory, e.g. <a href="/blog/archives/<$BlogArchiveFileName$>">Archives</a>). The exception is if your blog is on Blog*Spot, where the server takes care of the subdirectory for you, and you can just use <a href="<$BlogArchiveFileName$>">Archives</a>.

After you save your changes to the main template, go back in and copy your entire main template (right-click, select all, right-click, copy), then switch to your archive template, delete everything that is there, and paste in your main template. Scroll down to the <Blogger> section, delete everything between <Blogger> and </Blogger>, and replace it with:

<a href="<$BlogArchiveLink$>"><$BlogArchiveName$></a><br>

Save your changes, publish your blog, and then republish all your archives.

Separate to included

To switch from a separate archive index page to including the links in the main page, first replace the link to the archive index page in your main template with:

<script type="text/javascript" src="<$BlogArchiveFileName$>"></script>

Save your changes, and edit your archive template. Delete every single character in your archive template, and replace it with just:

document.write("<a href='<$BlogArchiveLink$>'><$BlogArchiveName$></a><br>")

Because the links will be included in both your main page and all your archive pages, if your blog isn't on Blog*Spot you will need to include the path to your archives before <$BlogArchiveLink$>, either as an absolute url (<$BlogArchiveLink$>) or a server-rooted url (/blog/archives/<$BlogArchiveLink$>). Save your changes, republish your blog, and republish all your archives.