« Pull Down Menus | Main | Converting to PHP »

What Do All These Templates Do?

Movable Type uses a template system to generate the pages of your weblog. To change which content elements and how they are displayed on the pages of your blog, you need to make changes to the appropriate templates.

manage-templates.gif

Selecting "Manage Templates" from the sidebar navigation in your weblog edit screen will show you the list of templates, but what do they all do? And, if you are trying to conserve storage space on your server, are there any you can delete?



Index Templates

Index templates have individual output files, specific to the template. Let's go down the list.

Click on image to enlarge
thumbnail


  • Atom Index - The Atom Index produces an Atom syndication feed, atom.xml for those newsfeed readers that prefer the Atom standard. (about syndication and newsfeeds)
  • Dynamic Site Bootstrapper - The Dynamic Site Bootstrapper generates mtview.php, a PHP script needed to produce dynamic pages. If you are planning to do dynamic publishing of any of your archive pages you need this file. If not, you don't need it and you can delete it if you want.
  • Main Index - The Main Index template generates the main index page of your weblog. It is the page that the browser sees when going to the main URL of your site. For example, www.elise.com actually takes you to www.elise.com/index.html. (The default output file of this template is index.html. If you want to change the suffix to .php, you can do that in the Main Index template edit window, or make a more universal change in the weblog config preferences.) This is a template that you will almost definitely need.
  • Master Archive Index - The Master Archive Index template produces a list of links to every entry in your weblog. Someone please correct me if I'm wrong, but at no point in the default set-up of your Movable Type weblog is this page referenced from another page in your weblog. I didn't know it existed until a year into using Movable Type and I can safely assert that if you are using the default set-up you can delete it and never miss it. I have found it useful in some cases, for example, the list of recipes on my recipe weblog. If you find you need it after all, the default template can be found at http://www.sixapart.com/movabletype/default_templates.
  • RSD - The RSD template produces an xml file that makes it possible for you to use a weblog editing tool to access and edit your MT files. Tools like Zempt and Ecto need this file to work. If you don't plan on using anything but the browser-dependent MT Edit interface to edit your blog, you don't need this file and can safely delete it.
  • RSS 1.0 Index and RSS 2.0 Index - These templates generate your RSS syndication feeds in two formats. Some people reading your feed may prefer one format over the other, so it may be useful to have both. I only release one feed on LMT because I want to control how my content is distributed and I have only figured out how to customize one of these feeds the way I want. In general however, the consensus is that it is best to have all of the feed templates - RSS 1.0, RSS 2.0, and Atom. (about syndication and newsfeeds)
  • Stylesheet - The stylesheet template is the CSS (cascading style sheet) file that governs the colors, font types and sizes, and all other style elements of your weblog. The default name of the file is styles-site.css, but you can choose any file name you want, as long as it ends with .css. If you do change the file name, you will need to reflect those changes in the header section of your main index and archive templates. You probably do not need to rebuild the stylesheet every time you rebuild your other index templates, so you can uncheck that option if you wish on the stylesheet template to speed up the overall rebuild process.


Archive-Related Templates

In contrast to index templates that produce singular pages, archive templates produce batches of pages. Archive templates come in three flavors - category, date-based, and individual entry.


  • Category Archive - The category archive template produces the pages that display all of the entries in a category. This archive type is not selected by default. To enable category archiving, and see the category archive template listed in your templates section, check "category" in the archive files section of your weblog config edit screen. You can also select "Edit Archive File Options" from the managing templates window. (See Displaying Categories.)
  • Date-Based Archive - By default, date-based archiving is enabled and Monthly archiving is selected as the archiving method. The monthly date-based archive template produces pages that display your entries by month. You can also choose instead weekly or daily archiving from the Archive Files editing window.
  • Individual Entry Archive - The individual entry archive template produces a web page for every individual weblog entry. The permalink (See (What is a Permalink?) of your entry goes to entry's individual page by default. You can set up alternative individual entry archive templates for other purposes, for example for generating printer-friendly pages, by creating a new archive template in the managing templates window, and then adding the archive template type to the Archive Files editing window. (See Printer Friendly Pages.)


Special Templates

Special templates govern the way comments, trackbacks, and image pop-ups are displayed.


  • Comment Listing Template - The Comment Listing templates is for comment pop-up windows, if you use that method of displaying your comments. If you use the MT3 default inline comment display, you can ignore this template.
  • Comment Preview Template - This template produces the page that is displayed when someone selects "preview" before posting their comment.
  • Comment Error Template - This template displays the error message when someone has not properly filled out all of the required fields for leaving a comment.
  • Comment Pending Template - If you have enabled comment moderation, this template produces the page that displays after someone has left a comment, but before it has been approved, so that they know that their comment has been received, but pending approval.
  • TrackBack Listing Template - This template directs the display of TrackBack pop-up windows, if you use that method of displaying your trackbacks. If you use the MT3 default inline trackbacks display, you can ignore this template.
  • Uploaded Image Popup Template - If you use MT's Upload File feature to upload images to your weblog, and you want to create an embedded image or a link to a popup image, this template governs how that popup image will display.
  • Dynamic Pages Error Template - If you use dynamic publishing, this template directs the display of error messages. You can also create custom error message on this template (see Custom Error Messages.)

Template Modules

Template modules are where you store bits of code that you might want to use in several templates. You can create a template module with a snippet of code and then use an MT Include to pull the code into a different template. (See Using PHP and MT Includes.) Template Modules are especially useful for setting up footer, sidebar, and navigation elements that are used consistently throughout your weblog.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)