The Movable Type Knowledge Base

Creating the Site Javascript Template

Question

How do I create the new "Site Javascript" template after upgrading to version 3.2?

Answer

There are two basic ways to create this template.

You can go to System Overview > Weblogs, choose your weblog, and then select Refresh Template(s). This this will revert all relevant templates in the weblog to the defaults, and also create a Site JavaScript template in that weblog for you.

OR

You can take the following steps to create only this template with the correct default code:

1. In your weblog, on the Templates > Indexes tab, select Create New Index Template.
2. Specify Site JavaScript1 as the Template Name, and mt-site.js as the Output File.
3. Make sure that "Rebuild this template automatically when rebuilding index templates" is checked, and then click SAVE.
4. Click Templates in either the left sidebar or the breadcrumbs menu to return to the Templates listing.
5. Select the new Site JavaScript template you just created.
6. Select Refresh Template(s) from the More Actions dropdown menu, and click GO.

This will create a new Site JavaScript template with the default code, as well as a "backup" template which can just be deleted (since it will be empty).

After creating this new template, you'll need to rebuild it to generate the mt-site.js file in your blog path.

1 Make sure you spell and capitalize the name exactly as shown (i.e., JavaScript, not Javascript).

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.