Movable Type enables publishing of individual, monthly, category and author-based archives by default, covering the needs of most users. Movable Type’s “Archive Mapping” feature allows you to specify the type of archives to publish as well as the location of those archives.
The power of archive mapping
With archive mapping, you can publish multiple sets of one or more archive types with alternate representations of the content. Here are some examples of how you might use Movable Type’s archive mapping capabilities:
Publishing both individual entry archives in HTML for viewing in a browser, and an RSS or Atom representation of that archive with an XML feed of each of the comments in that entry.
Publishing a duplicate version of category archives in WordXML or PDF formats, for offline consumption by your readers.
Publishing a low fidelity XHTML version of your date-based archives for reading on a mobile phone.
Defining archive maps
Archive maps are defined with each of your archive templates. Movable Type supports creating one of three different types of archive templates:
- An entry archive, which is used to display individual entries
- An entry listing archive, which is used to display a list of entries
- A page archive, which is used to display individual pages
When you create a new archive template, you can define how those archives are published through the Archive Mapping section of the Edit Template screen. By default, Movable Type will create:
- One archive mapping for your entry template type, to publish one archive file per blog entry.
- Four archive mappings for your entry listing template, including
- Monthly archives
- Author Monthly archives
- Category archives
- Category Monthly archives
- One archive mapping for your page template type, to publish one archive per blog page.
Here is a screenshot of the archive mapping list for a new blog’s Entry Listing template.
Creating a new archive map
To create a new archive map follow the instructions below:
- From the template listing screen, edit the template you want to change the mapping of.
- Click on “Template Options” underneath the text window of the template.
- Delete any template mappings (type/path/publishing) you don’t want.
- Click “Create Archive Mapping” to add the template mapping you do want.
- Click on the specific path and select “custom” if you want to create a custom path. (see below for more details)
- Save and Publish.
Selecting an Entry Listing Archive Map
When creating a new archive map for an Entry Listing template, Movable Type will provide you a set of archive map types to choose from. This choice determines (a) what content Movable Type will publish on the archive pages you’re creating and (b) your choices for default filepaths for publishing those archives.
The archive map types for Entry Listing templates include:
- Author Daily
- Author Weekly
- Author Monthly
- Author Yearly
- Category Daily
- Category Weekly
- Category Monthly
- Category Yearly
After selecting your archive type, you’ll be presented with a list of filepath options. Select the one you would like, or you can customize the way you would like it to appear. (See below.)
When you are finished managing your archive maps, click “Save” at the bottom of the Edit Template screen.
Note: The ability to author archives is new in Movable Type 4. Also new in Movable Type 4 is the ability to create date-based category (and author) archives, so that readers can “paginate” through larger archives.
Set Publishing Method
Movable Type 4.2 allows you to specify on a map-by-map basis how you want your archive mappings published. This setting can greatly affect performance. Here are the available options and what they mean:
- Statically (default) - publish this archive mapping immediately in real time. This tell Movable Type to publish this template whenever its contents are updated or affected by a change.
- Publish Queue - publish this archive mapping in the background. This setting is ideal for feeds or non-critical content that does not need to be refreshed immediately. See Publish Queue documentation.
- Dynamically - publish this archive map on demand, do not publish a file to the file system.
- Manually - publish this archive mapping only when a designer, author, or administrator explicitly says to, typically by hitting a “Save and Publish” button.
- Do not publish - never publish this template. This effectively disables publishing for this mapping.
Removing an archive map
To remove an archive map, locate and click on the trash can icon associated with the map you wish to remove. The ask you to confirm your choice before deleting it.
Customizing an archive map’s filepath
Movable Type allows you to customize how the system constructs the filepath for each of your archives. For example, by default the system will publish monthly archives for your blog to a filepath that looks like this:
yyyy/mm/index.html. But you could, if you like, customize that file path to read
Customizing your filepath is done through Archive File Path Specifiers.
Christopher on June 14, 2009, 6:49 a.m. 返信
If you could describe how to add a TAG archive mapping it would solve a lot of problems. Users (like me) could publish their Blogs allso with static TAG-Archives - so we could get more traffic, and MT would be more popular.
Is there any chance to make archive mapping for Tags (as a static pages)?
hi-fi hillary on June 30, 2009, 1:50 p.m. 返信
hi. what if you don’t even see the archiving mapping table as an option under ‘template options’ for your archive template? i’ve just upgraded to the recent MT thinking it just wasn’t there because it was an older version but it’s still not there.
hi-fi hillary on July 1, 2009, 11:51 a.m. 返信
the problem is step 4 (above). the only option in the “type” dropdown menu is “entry”. there are no other options…
ywoel on August 11, 2009, 2:49 a.m. 返信
hi. what if you don’t even see the archiving mapping table as an option under ‘template options’ for your archive template? i’ve just upgraded to the recent MT thinking it just wasn’t there because it was an older version room but it’s still not there.
sean on January 10, 2011, 11:10 a.m. 返信
Does anyone know what the proper way to set up an entry template for a mobile website? Essentially i’d like to store all mobile into a mobile folder with a different template. Removing all unneeded JS, CSS, etc…
So essentially, i’d like the entrylinks to point to “mobile/cat/sub-cat/…”