The Movable Type Knowledge Base

Integrating Your Site Design into Movable Type

Question

I've just installed Movable Type. How do I integrate my current site design into the system, so that the pages will now be updated with my Movable Type data whenever I publish a new entry?

Answer

Because each person's site is unique, there's not really a "one size fits all" way of integration with Movable Type; it's a process that differs according to your own preferences and needs. Overall, the best way to familiarize yourself with how the system works is to set up a test blog in a separate area of your site, and then make changes there to see the results. Once you're reasonably comfortable with how Movable Type works, you can begin the process of converting public pages of your site to be updating automatically by the system.

Since Movable Type templates are based on standard HTML/CSS, you can replace the default code in those templates with your own custom designs. But because your weblog data is now stored in the Movable Type database, you need to integrate special Movable Type Template Tags into your custom templates in order for your site to be updated automatically when you add new entries. These tags retrieve the blog and entry data from the database when pages are built.

Certain elements of your pages must be replaced with the appropriate Template Tag in order for Movable Type to retrieve the data. For example, if you normally display the name of your weblog in your pages, like this:

<h1>This Is My Weblog Name</h1>

The appropriate replacement for that would be:

<h1>MTBlogName</h1>

The <MTBlogName> tag will return the name of your weblog (as specified in the Weblog Configuration screen).

Another example is listing recent entries you've published. The <MTEntries> container tag will generate this list for you (based on your system settings and certain attributes you apply to the tag). The following example would list the last ten recent entries published to your site, showing the date, entry title, and an excerpt of each entry:

<MTEntries lastn="10">
<MTEntryTitle> - <MTEntryDate><br />
<p><MTEntryExcerpt></p>
</MTEntries>

(You can read more about the available attributes for this tag in the Template Tag Reference on MTEntries.)

So, the approach you need to take is to first evaluate your current design and identify which elements are content as opposed to style. Then locate the appropriate Template Tag corresponding to that element and use it as a replacement.

Once you've gone through your current page layout and modified it to use the necessary Template Tags, you can then replace the appropriate Movable Type Template with your own code. For example, if you're working on the main index page for your site, you'll be replacing the Main Index Template in Movable Type.

Special note for those using DreamWeaver - make sure it does not convert the Movable Type tags to lowercase letters, i.e., the proper tag is MTBlogName, not mtblogname. These are case-sensitive and Movable Type cannot read the tags if the case is incorrect.

Related Information on Template Tags:

1 You can also click the HELP link while logged into Movable Type and select Template Tags from the Users Manual - Table of Contents to view your own copy of this listing.

Submit Feedback on This Article

Your comments on how we can improve this article are appreciated; but please do not use the feedback form to submit support requests or questions. We will not respond to or publish such queries submitted through this form. If you have a technical question or problem, visit Movable Type Support.

Yahoo! Small Business web hosting services

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.