All Entries Template

| | Comments (7) |

On the occasion of his 100th blog posting, Ted wondered if he could create an all entries view. Scot Hacker has an All Posts Ever view, so I knew it was possible.

I went under templates and made a new Index Template (not archive template) called "All Entries." I made the output file = all.html.

I then chopped up a copy of the Main Index templates to get down to the minimal code needed to create the all.html file. You can copy/paste the code below to make your own all.html template like mine.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<$MTPublishCharset$>" />

<title><$MTBlogName$>: All Entries</title>

<link rel="stylesheet" href="<$MTBlogURL$>styles-site.css" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="<$MTBlogURL$>index.rdf" />


</head>

<body>

<div id="banner">
<a href="<$MTBlogURL$>" accesskey="1"><$MTBlogName$>: All Entries</a>
</div>
<div class="description"><$MTBlogDescription$></div>

<div id="container">

<div class="blog">
<MTEntries lastn="1000000">
<span class="title">
<a href="<$MTEntryPermalink$>"><$MTEntryTitle$> </a></span> <span class="posted"><$MTEntryDate format="%x"$></span><br />


</MTEntries>
</div>

</div>

</body>
</html>

To give quick access to the file, I added an "All Entries" link at the top of the archives division in the Main Index:

<div class="sidetitle"> Archives </div>

<div class="side">
<a href="all.html">All Entries</a><br />
<MTArchiveList archive_type="Monthly">
<a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a><br />
</MTArchiveList>
</div>

Now playing: Keep on Rocking in the Free World by Pearl Jam

Categories

7 Comments

UT said:

Awesome! All 100 entries linked from one page!

I added a link back to the main blog at the bottom so people wouldn't get stuck on that page, though it looks like you can just click the top banner and do the same.

Eric said:

Can someone help me with this? It's a little over my head.

UT said:

Log in. Click "Manage Weblog". Click "Templates". Click "Create new index template". For Template Name type "All Entries". For Output File, type "all.html" (don't type the quotes). Then in the Template Body paste in the contents of the first box above. Click Save. It will ask you to Rebuild, but you don't need to do that yet.

Go back to Templates. Click Main Index which is the basis for your main blog page that everyone sees. In the second box above you have to copy the line in bold and insert it into the correct place. So look for that section in the Template Body and then paste (or type) in that line. I made it a little fancier by putting tags in to make that line bold, which you know how to do using B and /B. Then click Save and this time go ahead and rebuild.

One thing that computer programmers get really good at is pasting in code that other people have already written. It's easy to do with web pages too because you can go in and View Source on any web page and see how they wrote the code. The problem is some code is so complicated you can't figure out how to customize it.

Eric said:

theres something wrong with it. All entries is on every other archive. look.

UT said:

It looks like it is working on your page to me. What do you mean it is on every other archive? Other people's archives? I put it on my web page, and Uncle Jeb put it on his and Stonegate's. You may have to click Reload to see the latest changes.

UT said:

I see what you're saying now. I bet you pasted that line in the wrong place. Or your main template is different than everyone else's. Just go back and make sure it is in the right place, right after div class = "side"

Eric said:

I fixed it. It doesnt look quite right with my stylesheet, but that's ok

Leave a comment

About this Entry

This page contains a single entry by Jeb published on December 19, 2004 7:33 PM.

Hopkin Revisited was the previous entry in this blog.

The Graphing Calculator is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.31-en

Good Reads

Flickr Badge

www.flickr.com
This is a Flickr badge showing items in a set called Wallet. Make your own badge here.