Template Inheritance is a plugin for Movable Type that enables you to link templates together in a way that one template inherits its template code from another template. One example is when you have two or more blogs in your MT system, and you want to use the same design or template layout for each blog. Using the Template Inheritance plugin, you can effectively use one blog's templates as master templates that control the templates of the other blogs. So if you have 3 blogs on a company site with same look and feel, this can save you a lot of time manually updating the templates of each blog every time you make a change. Another way to think of it is sharing templates between several blogs. You can link all the templates in one blog to another, or selectively choose which templates should be inherited (including template modules).
New Features in Template Inheritance Pro 2.0
There two new features:
- Support for MT4
- A powerful "Inherit all Templates" feature that enables you to quickly link all of the template of blog, in a single step. This function even goes a step further -- if the "parent blog" has templates that don't exist in the "child blog", then those templates will be automatically created and then linked, so that they are inherited from the parent blog. In short, this will effectively copy all the template from Blog A to Blog B, and then link them so that when you make changes to templates in Blog A, the changes are made automatically in Blog B.

Background
I have wanted a plugin like this for years, the ability to share template code between multiple blogs. For a long time, MT has included a "Link this template to a file" feature in which you could link a template to an actual file on your server. I used to link multiple templates to the same file, effectively (and indirectly) sharing the template code between different blogs. While this works, it has its problems. At times in the past, there we MT bugs that prevented templates from being updated from the file - but I think those are fixed now. The other main problem is that you have to be very careful when editing a template, remembering that it may be shared with other blogs, etc. The Template Inheritance plugin is an improvement over the file linking method, addressing the key issues with file-based linking.
Features
For any specific template, you can assign another template on the system from which to inherit template code. For example you could decide that you want template "B" to inherits its template code from template "A".

It may be helpful to think of "A" as the parent template and "B" as the "child" template -- the child inherits its template code from its parent. When template becomes linked to parent template, the child's template code will immediately be replaced by the template code of the parent, and will be derive its template code from the parent from that point forward. You won't be able to edit the child template after the link is made (the template code is greyed-out and the field is disabled) -- instead, you will see a link to the parent template, and you can then edit the parent template.

Editing the parent template will automatically update all of its children templates. Of course, you need to rebuild the appropriate pages on each blog for template changes to be reflected on your blogs. You remove remove inheritance (break the link with the parent) at any time. When you remove inheritance from a child template, it becomes independent from that point forward, and you can now customize it independently of the parent template.
Or, you can use the "Inherit all Templates" function to link all of a blog's templates to those of another blog. This is major time saver when you have multiple blogs that you want to use the same layout and design. Simply create and customize the templates on a "master blog" then link the other blogs quickly.
Notes:
- Only system administrators (sometimes called superusers) can create inheritance links.
- You must enable the plugin for each blog before you can create inheritance links (blogs to have "child" templates need to be enabled, not those containing the "parent" templates)
- A template cannot be both a child and a parent. If you try to assign inheritance from a template that is a child of another template, it will work -- but the plugin will make the link directly the ultimate parent. This makes it easier to manage, as you won't have to trace template linkages through several generations to find the "master" template.
- When a parent template is deleted, each of its children immediately become independent (orphaned, if you will).
- When first assigning inheritance to a template, the child template's code is replaced by that of the new parent. BE CAREFUL, there is no undo, the child's former template code will be gone. This is also true when using "Inherit All Templates". Just to be safe, it may be a good idea to back up the old template code beforehand, in case you decide to revert back.
Requirements
- MT 3.3+
Note: the "Inherit all Templates" feature is currently available only on MT4. If you are interested in using this feature with MT3.3x, please let me know.
Great for Blog Networks
While Template Inheritance can be used in many different scenarios, it is a great fit for blog networks. Networks of blogs on the same MT system often have similar (or identical) design or template code. Sometimes only certain things are the same, such as a common header / footer, stylesheet, sidebar, advertising blocks, etc. Using this plugin to link up those common template elements, you can save a lot time managing the templates of the network. If you have a blog network and this sounds interesting, please contact me. I can help implement this for you, customize the plugin to meet your specific needs, etc.
Instructions
- Extract the contents of the zip file and upload the contents of the 'plugins' directory into the 'plugins' directory of your MT installation
- Login to MT (or hit Main Menu, if you are already logged in). You should now see and upgrade screen that will install a table for Template Inheritance.
- Browse to the blog you want, then go to the plugin settings to enable the plugin.
- Browse to the template you want, then click the "Click here to inherit code from another template" link.
- Enter the template ID of the desired parent in the prompt box, hit OK.
- The template is now linked to the parent. Rebuild to see the results on your site.
- (Pro Version only) Or use the "inherit all blogs" feature to link an entire blog.
Get Template Inheritance
Template Inheritance is free for personal use on up to 3 blogs.
Donations are appreciated:
Download Now
Template Inheritance Pro is only available with a license:
Commercial License (4-10 blogs): $97
Blog Network License (10+ blogs): $249
As always, feedback and suggestions are appreciated. Please reply to this entry.



Comments (10)
Hi Mark,
This looks perfect for me. I just installed, got the upgrade screen, enabled it in each blog and I'm not seeing the links in the templates. I even deleted and re-built a template. No dice. It must be something obvious, but what could I be missing? From your screenshots it looks as though the links should be right there in the templates themselves. Thanks.
Posted by Solomon | November 10, 2007 9:57 AM
Posted on November 10, 2007 09:57
Mark:
Ditto on Solomon's comment.
Posted by Culture Snob
|
November 12, 2007 8:10 PM
Posted on November 12, 2007 20:10
Solomon and Culture Snob,
What version of MT are you using? And what version of Template Inheritance? Please note that this entry refers to "Template Inheritance Pro", which is only available with a license purchase. The download link above is for the free version of Template Inheritance, which is not supported on MT4. I probably should remove that download link from this entry, as I can see how it could be confusing -- instead I think I will refer to the older entry here.
Posted by Mark Carey
|
November 12, 2007 8:24 PM
Posted on November 12, 2007 20:24
Mark: MT4.01, which explains why it doesn't work.
I would also suggest that you offer a license for fewer than four blogs, and maybe define the terms a little more. Technically, I have four blogs, but three of them are components of one blog; the extra blogs are work-arounds to create features I want the way I want them.
This plugin looks like it could be valuable to me, but not $97 valuable. What price are you thinking of for fewer than four blogs?
Posted by Culture Snob
|
November 12, 2007 8:50 PM
Posted on November 12, 2007 20:50
Or maybe I should read the documentation? Just to clarify, would Template Inheritance Pro 2.0 be free for up to three blogs?
Posted by Culture Snob
|
November 13, 2007 12:54 PM
Posted on November 13, 2007 12:54
I need to make some changes to this page, as it is definitely confusing. As it stands now, the Pro version is only available with a commercial license, even with less than 4 blogs.
I need to decide how I want to handle licenses for less than 4 blogs. I might offer a lower priced license, but it would likely exclude the "inherit all blogs" feature discussed above. That is a power feature that appeals most to those with a large number of blogs anyway. Thoughts?
Posted by Mark Carey
|
November 13, 2007 1:07 PM
Posted on November 13, 2007 13:07
Mark,
Have you decided on licensing for the Pro version for less than 4 blogs?
I am on MT 4.01 and currently have 2 blogs that will function on the same site. I would like the second blog to inherit the master blog's templates. I'd really like to use your plugin, but $97 seems a bit excessive for what I want to do.
I would be fine with a lower price and I can definitely inherit templates one-at-a-time (actually, I would love to have the "inherit all blogs" feature, but I'm just trying to be reasonable :-) ).
Thanks
Posted by MarkR
|
December 29, 2007 3:34 PM
Posted on December 29, 2007 15:34
Hi,
I use this plugin in my base blog that other blogs are cloned based on this. But in the cloned blogs no template is inherited. Is this something related to clone or your plugin? So far as i know clone plugin clones the plugin data also. am I right?
Posted by Eric
|
February 10, 2008 8:55 AM
Posted on February 10, 2008 08:55
Hi Mark,
While Template Inheritance can be used in many different scenarios, it is a great fit for blog networks. Networks of blogs on the same MT system often have similar (or identical) design or template code. Sometimes only certain things are the same, such as a common header / footer, stylesheet, sidebar, advertising blocks, etc.
Posted by Truck campers | March 12, 2009 12:16 AM
Posted on March 12, 2009 00:16
Mark: MT4.01, which explains why it doesn't work.
I would also suggestدردشة صوتية
الولة
شات صوتي
that you offer a license for fewer than four blogs, and maybe define the terms a little more. Technically, I have four blogs, but three of them are components of one blog; the extra blogs are work-arounds to create features I want the way I want them.
This plugin looks like it could be valuable to me, but not $97 valuable. What price are you thinking of for fewer than four blogs?
Posted by دردشة صوتية | April 8, 2009 1:17 PM
Posted on April 8, 2009 13:17