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

  1. Extract the contents of the zip file and upload the contents of the 'plugins' directory into the 'plugins' directory of your MT installation
  2. 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.
  3. Browse to the blog you want, then go to the plugin settings to enable the plugin.
  4. Browse to the template you want, then click the "Click here to inherit code from another template" link.
  5. Enter the template ID of the desired parent in the prompt box, hit OK.
  6. The template is now linked to the parent. Rebuild to see the results on your site.
  7. (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

Download Now
Downloads: 170

Membership required, please sign-in or register:

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.

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).

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.

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. 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+

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 interested, please contact me. I can help implement this for you, customize the plugin to meet your specific needs, etc.

Instructions

  1. Extract the contents of the zip file and upload the contents of the 'plugins' directory into the 'plugins' directory of your MT installation
  2. 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.
  3. Browse to the blog you want, then go to the plugin settings to enable the plugin.
  4. Browse to the template you want, then click the "Click here to inherit code from another template" link.
  5. Enter the template ID of the desired parent in the prompt box, hit OK.
  6. The template is now linked to the parent. Rebuild to see the results on your site.

Get Template Inheritance

Template Inheritance is free for personal use on up to 3 blogs.

Donations are appreciated:

Download Now

Download Now
Downloads: 170

Membership required, please sign-in or register:

Commercial License (4-10 blogs): $97

Blog Network License (10+ blogs): $249

As always, feedback and suggestions are appreciated. Please reply to this entry.