![]() |
|
![]() |
Paged Archives Plugin: Sample TemplatesFollowing is an example template using the default Category template which comes with Movable Type 3. It's presented here for reference purposes. PagedArchive tags are displayed in red. The tags roughly correspond to what I have on my weblog. See further down for an example MT4 template <!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" id="sixapart-standard">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<$MTPublishCharset$>" />
<meta name="generator" content="Movable Type <$MTVersion$>" />
<link rel="stylesheet" href="<$MTBlogURL$>styles-site.css" type="text/css" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="<$MTBlogURL$>atom.xml" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<$MTBlogURL$>index.xml" />
<title><$MTBlogName encode_html="1"$>: <$MTArchiveTitle$> Archives</title>
</head>
<body class="layout-one-column">
<div id="container">
<div id="container-inner" class="pkg">
<div id="banner">
<div id="banner-inner" class="pkg">
<h1 id="banner-header"><a href="<$MTBlogURL$>" accesskey="1"><$MTBlogName encode_html="1"$></a></h1>
<h2 id="banner-description"><$MTBlogDescription$></h2>
</div>
</div>
<div id="pagebody">
<div id="pagebody-inner" class="pkg">
<div id="alpha">
<div id="alpha-inner" class="pkg">
<p class="content-nav">
<a href="<$MTBlogURL$>">Main</a>
<MTPAIfMultiplePages><br />
<MTPAPreviousPage text="«"> Page <MTPAPageNum> of <MTPAPageCount> <MTPANextPage text="»"></MTPAIfMultiplePages>
</p>
<MTEntries><MTPAEntry>
<$MTEntryTrackbackData$>
<MTDateHeader><MTPADate><h2 class="date-header"><$MTEntryDate format="%x"$></h2></MTDateHeader><MTPADateEnd>
<a id="a<$MTEntryID pad="1"$>"></a>
<div class="entry" id="entry-<$MTEntryID$>">
<h3 class="entry-header"><$MTEntryTitle$></h3>
<div class="entry-content">
<div class="entry-body">
<$MTEntryBody$>
<MTEntryIfExtended>
<p class="entry-more-link">
<a href="<$MTEntryPermalink$>#more">Continue reading "<$MTEntryTitle$>" »</a>
</p>
</MTEntryIfExtended>
<p class="entry-footer">
<span class="post-footers">Posted by <$MTEntryAuthorDisplayName$> at <$MTEntryDate format="%X"$></span> <span class="separator">|</span> <a class="permalink" href="<$MTEntryPermalink$>">Permalink</a>
<MTIfCommentsActive>| <a href="<$MTEntryPermalink$>#comments">Comments (<$MTEntryCommentCount$>)</a></MTIfCommentsActive>
<MTIfPingsActive>| <a href="<$MTEntryPermalink$>#trackback">TrackBacks (<$MTEntryTrackbackCount$>)</a></MTIfPingsActive>
</p>
</div>
</div>
</div>
</MTEntries><MTPAEnd>
<MTPAIfMultiplePages><div style="text-align: center"><MTPAPreviousPage show="1"> <MTPAPageList> <MTPANextPage show="1"></div></MTPAIfMultiplePages>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Below is an example template based on the default "Entry Listing" template that comes with Movable Type 4, also presented here for reference purposes. The limit="auto" argument on the <MTEntries> tag in the default version of this template doesn't work right with PagedArchives, so the whole section which I've modified is shown below in red. See additional note below. <MTSetVarBlock name="body_class">mt-archive-listing mt-<MTVar name="archive_class"></MTSetVarBlock>
<MTSetVar name="sidebar" value="1">
<MTSetVar name="module_about_context" value="1">
<MTSetVarBlock name="page_title"><$MTArchiveTitle$> Archives</MTSetVarBlock>
<$MTInclude module="Header"$>
<h1 class="archive-title">
<MTUnless name="datebased_archive">
<MTIfArchiveType archive_type="Category">
Recently in <em><$MTArchiveTitle$></em> Category
</MTIfArchiveType>
<MTIfArchiveType archive_type="Author">
Recently by <em><$MTArchiveTitle$></em>
</MTIfArchiveType>
<MTElse>
<$MTGetVar name="page_title"$>
</MTUnless>
</h1>
<MTEntries><MTPAEntry>
<$MTEntryTrackbackData$>
<$MTInclude module="Entry Summary"$>
</MTEntries><MTPAEnd>
<MTPAIfMultiplePages><div style="text-align: center"><MTPAPreviousPage show="1"> <MTPAPageList> <MTPANextPage show="1"></div></MTPAIfMultiplePages>
<div class="content-nav">
<MTArchivePrevious>
<a href="<$MTArchiveLink$>">« <$MTArchiveTitle$></a> |
</MTArchivePrevious>
<a href="<$MTLink template="main_index"$>">Main Index</a> |
<a href="<$MTLink template="archive_index"$>">Archives</a>
<MTArchiveNext>
| <a href="<$MTArchiveLink$>"><$MTArchiveTitle$> »</a>
</MTArchiveNext>
</div>
<$MTInclude module="Footer"$>
Important note! Because the same "Entry Listing" template is used for monthly archives as well at category archives, the above MT4 template will obviously cause both monthly and category archives to be paged. If, say, you wanted only the category templates to be paged, you could replace the red section like so: <MTIf name="datebased_archive">
<MTEntries>
<$MTEntryTrackbackData$>
<$MTInclude module="Entry Summary"$>
</MTEntries>
<MTElse>
<MTEntries><MTPAEntry>
<$MTEntryTrackbackData$>
<$MTInclude module="Entry Summary"$>
</MTEntries><MTPAEnd>
<MTPAIfMultiplePages><div style="text-align: center"><MTPAPreviousPage show="1"> <MTPAPageList> <MTPANextPage show="1"></div></MTPAIfMultiplePages>
</MTIf>
|