Template Installer is a plugin for Movable Type that makes it easy to install new template sets for your blogs. Combined with Template Exporter plugin, this makes is very easy:
- For bloggers to share templates / widgets with others
- For designers to package, sell, and distribute template sets.
- For companies to deploy template sets to company blogs
Currently, sharing templates requires a lot of cutting and pasting, a very time consuming process. Using Template Installer it takes only a few clicks to install a partial or complete template set in your blog.
New in Version 1.1
- Version 1.1 of Template Installer now includes support for MT 4.1. You can use this version with either MT 4.01 or MT 4.1.
- The code has also been optimized to reduce CPU / memory usage, thus improving performance.
- No new features have been added.
Note: Template Installer v1.1 can be used to install templates that have been exported using any version of Template Exporter. Templates exported by the new Template Exporter v1.1 cannot be installed with older versions of Template Installer, you'll need version 1.1 for those.
The following screencast shows how easy it is to install new templates using Template Installer. In this example, the user chooses to install the "Default Templates", which is handy when you want to revert back to the defaults. The same process would be used to install a completly new set of templates. Click on the video below to watch:
As you can see, it is very quick and easy. As you can see from the last screen, Template Installer will back up your existing templates if they have been customized from the MT defaults.
The missing step from the above example is to upload the desired template set to the /plugins/TemplateInstaller/template_sets directory. No need to edit any files or settings. Once you have uploaded the set, it will appear as an option when you click "Install Templates" from the right side of the Manage Templates screen.
- Template Refresh plugin (included with MT4)
- Download and extract the zip file, and upload the contents of 'plugins' folder to the 'plugins' directory of your Movable Type installation.
- Go to Design > Templates and then choose the "Install Templates" link from the lower right of the page.
- Choose a template set from the drop-down box, then click continue.
- View the results, then click "return to templates", and you are done.
Included Template Sets
The current version of Template Installer includes 3 template sets:
- Default Templates - These are the default templates that come with MT4. While you can also use the Template Refresh plugin to re-install these, Template Installer provides easy access to do so. This set is also a good example set to see how it works.
- Default Templates with Prefix Notation - A version of the default templates that use the new prefix notation. For example, <MTEntries> becomes <mt:Entries>, and so on. This template set will have the same output in your published blog as the default set, only the notation used is different. Note that the tags in this are not complete lowercases (it used mt:EntryTitle and not mt:entrytitle) Thank you to Marleen Zachte for creating this set and giving permission for its inclusion with this plugin!
- Page Template Only - This set will install the MT4 default "Page" template, as well as the included "Page Detail" module. This set will be useful for those upgrading from previous version of MT, since the Page template is not automatically installed on existing blogs, during the MT4 upgrade.
- 2 Column Layout Header - This set provides a replacement to the "Header" template module. The default MT4 templates use a 3-column layout. If you want to eaily change your blog to a 2-column layout, just install this template set.
- Template Installer Widget - The set includes a widget template that you can use with the MT Widget Manager to show your support and spread the word about Template Installer. It is also a good example of how Template Installer can be used to distribute and install blog widgets.
Want more template sets?
Template Installer is new, so there are currently not many template sets available. If you have template sets that you would like to share, I will post a link to them here. Please contact me using the contact link in the menu above. You should also check and post your template sets to the following page on the MT wiki: Template Sets for MT4.
Get Template Installer
Template Installer is free to MT Hacks members for commercial or non-commercial use:
Downloads: <$MTAjaxRatingVoteCount id="1" type="templateinstallerdownloads"$>
A Feature for Plugin Developers
For certain plugins, it makes sense to distribute custom template or widgets along with the plugin code. In the past, I included a special template installer routine to help users install such templates. In future, I will be use Template Installer for this purpose, and you can too. Rather than ask users to upload your template set to the Template Installer directory and ask them to install the set, I have include a "side door" feature that can be used instead. Using this approach, the templates are stored in a sub-directory of your plugin. Then you can simply present a link to your users to install the templates. The link would look something like this:
Of course, you will likely use template tags to form this url, but the key things are to make it open a dialog, to set the "template_path" parameter to the path to your template files (relative to the mt root directory), the "set" parameter to name of your set, and you can also set the "return_args" to return the user to your plugin screen after the templates have been installed. When users click this link, they will bypass the "choose a template set" screen and your templates will be installed immediately.
How do I Export Templates for use with Template Installer?
While you could do it manually, and it wouldn't be too hard, you probably want to use the sister plugin, Template Exporter, which automates the process in a single click.
As always, thoughts and suggestions appreciated.