One very exciting new feature in MT3.2 is the new handling of the default templating system. Instead of one consolidated file tucked away in the source code, the default templates have been created individually and are stored in the default_templates folder in the MT directory. Customizations are much simpler now - no more hacks - just edit a default template right from the folder. Thanks to the new TemplateRefresh feature (a plugin included in the MT installation), there is great ease in applying default templates for use across your entire installation, both for existing AND newly created blogs. All it takes now is one simple action to selectively (or corporately) apply MT3.2's newly designed index, archive and system templates to existing blogs. The new templates are created and backups are written for your old templates.
With a tiny bit of hacking, you can also create your own "default" templates that can be created/ refreshed along with MT's default templates. This could be especially useful for "about" pages, includes, etc., that you would want to use across multiple blogs. For example, I prefer to have my banner code separate from my other templates and call it in as an include. Because I typically use the same banner code and a generically named image in my banners (banner.gif or whatever), I can use the same code in every blog. I created a default template with my banner code, named it banner.tmpl, and dropped it in the default_templates folder. Next, I did a teeny hack to lib/MT/default_templates.pl by inserting the following under any other code snippet in the list :
(where rebuild_me 0 = don't rebuild with indexes and 1 = do rebuild with indexes)
Finally, I edited all the default templates where I wanted to replace the banner code, using instead a php include:
<?php include ("inx/banner.inc"); ?>
(Regarding banners, the beauty of using an include is that I can change the banner code in just ONE place rather than in every index and archive template.)
I refreshed the templates for my blog(s) and a rebuild of all files finished the job. Note that when TemplateRefresh will be creating new templates, you must do this action through the System Overview/Weblogs menu. Refreshing through Main Menu/Weblogs/Templates will only refresh existing templates. I haven't tested this out in different situations so no guarantees. These are just examples of things that work for me within my particular templates, etc. Please note that this was done most recently with MT3.2b5... I will test it again when the public release comes out.
As always... please BACKUP your stuff before tweaking, hacking or customizing. ;-)
