Template Modules

Template modules provide a way for designers to create reusable components that can be shared between templates. For example, template modules are the perfect way to define a shared header and footer for all pages of your website.

TypePad uses template modules to encapsulate components of your weblog's design so that you can more easily customize specific areas of your design without completely overriding all of TypePad's default behavior.

Using Template Modules

Creating New Template Modules

Users of advanced templates can create template modules of their own to be used and reused within any advanced template set (but not between advanced template sets). To create a new template module

Customizing Existing Template Modules

When a design is converted to an advanced template set it is already made up of a collection of template modules defined and maintained by TypePad. If you wish to override these template modules with your own, simply create a new local template module with the same name as the one you wish to customize.

To then use this customized template module as opposed to the default TypePad template module you will need to modify the include directive used to import the template module into another template.

Including Template Modules

Once a template module has been created you must "include" it in another file in order to incorporate its contents into another template. To include a template module you created you must use the MTInclude template tag. However, if you wish to include a template module written and maintained by TypePad you must use the MTWeblogIncludeModule tag. The syntax for these two tags is shown below.

<$MTWeblogIncludeModule module="module-name"$>

<$MTInclude module="module-name"$>

"Optional" Template Modules

There are many modules included by TypePad's default template modules for which there is no content. In other words, it's as if the template module is empty. This is by design, and is in place to give TypePad customers a way to insert HTML fragments into various sections of their design in a more modular fashion.

For example, the head-common template module includes the head-extra template module, however the head-extra is not listed among the other template modules below. To take advantage of this modularity, simply create a template module called head-extra and convert the MTWeblogIncludeModule tag into a MTInclude tag.

List of Optional Modules

The following list of template modules are referenced by other modules, but are empty, and are therefore not listed among the index of template modules below.

Template Module Index

Below is a listing of all of TypePad's template modules which you are free to use, reuse and customize.

Page Header

Module Name: head-index

Included By: Main Index Template

Common Header

Module Name: head-common

This module also includes: head-extra, head-archives, head-category, head-individual

Module Name: banner

Included By: Main Index Template, Archive Index Template, DateBased Archives, Category Archives

This module also includes: banner-header

Entry List

Module Name: entry-list

Included By: Main Index Template, DateBased Archives, Category Archives

Archives Header

Module Name: head-archives

This module also includes: head-common

Included By: Archive Index Template

Archive Listings

Module Name: archives-full

Included By: Archive Index Template

Date Based Archive Header

Module Name: head-date-based

This module also includes: head-common

Included By: DateBased Archives Template

Archives Navigation

Module Name: archives-nav

Included By: DateBased Archives

Category Archive Header

Module Name: head-category

This module also includes: head-common

Included By: Category Archives

Individual Archive Header

Module Name: head-individual

This module also includes: head-common

Included By: Individual Entry Archive Template

Individual Entry

Module Name: entry-individual

Included By: Individual Entry Archive Template

Comment Listing

Module Name: comment-list

Included By: entry-individual

Comment Form

Module Name: comment-form

Included By: entry-individual


Copyright © 2003-2005 Six Apart

[top]