Not a developer? Go to MovableType.com

MT5 Documentation

Core Theme Elements

This page describes how to define data in Movable Type Core Theme Element.

Template Sets

Template Sets are a collection of templates applicable to websites or blogs. You will use template sets when you create a blog and apply a theme. The 'Theme Element' template set is a wrapper for template set functions from Movable Type 4. For most functions - registering with the registry, running Template Refresh, etc - you can use Template Sets the same way you used previous template sets.

Please specify "template_set" as the importer attribute.

base_path

Use a relative path from the theme directory to specify the template source file's search path starting point.

templates

Define templates. For more information, please refer to the template set documentation.

        data:
            label: Classic Blog
            base_path: templates
            require: 1
            templates:
                archive:
                    category_entry_listing:
                        label: Category Entry Listing
                        mappings:
                            category:
                                archive_type: Category

Static Files

You can install theme static files in the blog directory. Create a sub-directory in the theme root blog_static directory to put the theme files in. Specify the sub-directory name in array. The importer should be "blog_static_files".

elements:
  blog_static_files:
    component:~
    data:
      - js
    importer: blog_static_files

ThemeStaticFileExtensions

This is a list of suffixes of files that are permitted as theme files. Files not included in this list are not installed when the theme is applied.

Category / Folder

Categories and folders and automatically created when you apply a theme. Specify basename as the hash key for the categories and folders to be created. The importer should be "default_categories" or "default_folders".

Use the following fields for Category/Folder content:

label

Category/Folder display name.

children

Describe Subcategory/Subfolder recursively.

data:
    foo:
        label: The Foo
        children:
            foo_junior:
                label: Foo Junior

Page

Create pages on the blog when applying the theme. If there are already existing pages with the same basename or Title in the blog that you'd like to apply a theme to, this process will be skipped.

The importer should be "default_pages". Page basename is used as a hash-key for each page.

Assign the following fields for the content of the page:

  • title
  • text
    Main body of nthe page.
  • text_more
    Continuation of text.
  • excerpt
  • keywords
  • status
    Use integer to specify initial publish status.
    1 = Draft
    2 = Publish
  • tags
    Specify multiple tags by separating each with a comma.
  • folder
    Assign the page folder. If a folder does not exist, one will be created automatically. Use slashes to assign a deep hierarchy of folders.
data:
    about:
        basename: index
         title: About
         text: <__trans phrase="_PWT_ABOUT_BODY">
         tags: @about
         folder: about

Settings

Specify website/blog settings. Use hash to specify blog (or website) setting fields. The importer should be "default_prefs".

  default_prefs:
    component: core
    importer: default_prefs
    data:
      file_extension: php
      convert_paras: 0
      allow_comments_default: 0
      allow_pings_default: 0

Custom Fields

Create custom fields. If there are multiple, overlapping basename or TagName fields on the current blog environment, install will be skipped. The importer should be "custom_fields".

custom_fields:
    component: commercial
    importer: custom_fields
    data:
        list_by_step:
            default: 0
            description: Show List by Step
            name: List By Step
            obj_type: entry
            options:~
            required: 0
            tag: EntryListByStep
            type: checkbox
Back