Not a developer? Go to MovableType.com

Documentation

The Structure of a Plugin

First, all the files associated with a plugin should be contained within a single root folder for the plugin. The plugin’s root folder can contain as many files and sub-folders as necessary to support the plugin. The plugin’s root folder is then placed within Movable Type’s addons folder.

If your plugin contains multiple files and support files, it is customary for those files to be placed within the following folder heirarchy:

  • MT HOME (where mt.cgi resides)
    • plugins
      • PluginName (plugin root folder)
        • mt-static (where all javascript, css and images will be placed)
        • extlib (where all external support libraries, for example required perl modules, are placed)
        • tmpl (where all template files for rendering plugin UI elements within the application are placed)
        • lib (where all plugin library files, or perl modules, are placed)
        • php (where all Smarty PHP files are placed for a plugin to support dynamic publishing are placed)
        • t (where any unit tests are placed to help validate that a plugin is functioning and is configured properly)
        • tools (where any scripts or utilities are placed)

However most plugins will not be so complicated. In fact most plugins can usually consist of a single file.

Back