Not a developer? Go to MovableType.com

Documentation

Building Menus

Movable Type allows you to add menus and menu items to the main navigation of the main Movable Type application. This is a great way for you to provide convenient links to your users and an intuitive way in which to access your plugin.

Creating a New Menu

The following sample code will add a new menu labeled “My Menu” with a single menu item called “Upload Video.”

name: Example Plugin for Movable Type
id: Example
description: This plugin is an example plugin for Movable Type.
version: 1.0
applications:
    cms:
        menus:
            mymenu:
                label: 'My Menu'
                order: 600
            mymenu:video:
                label: 'Upload Video'
                mode: 'video_upload'
                order: 301
                args: 
                    '_type': "blog"
                permission: 'manage_assets,publish_post'
                view: blog

Adding Items to an Existing Menu

The following sample code will add a menu item labeled “My Objects” to Movable Type’s “Manage” menu:

name: Example Plugin for Movable Type
id: Example
description: This plugin is an example plugin for Movable Type.
version: 1.0
applications:
    cms:
        menus:
            manage:myobjects:
                label: 'My Objects'
                mode: 'list_myobjects'
                order: 301
                args: 
                    '_type': "blog"
                permission: 'manage_assets,publish_post'
                view: blog

Here is a list of the menu IDs that Movable Type ships with that you are free to extend:

  • create
  • manage
  • design
  • prefs
  • tools

Registry Properties

  • label - the name of the menu item as it will appear in the menu

  • mode - the app mode that will be invoked when you click the link. Note: this will require you to define and register an app mode with the same name as the value of this property.

  • dialog - as an alternative to mode one can specify dialog which will spawn a dialog window that invokes the mode with the name assigned to the dialog property

  • order - the order or placement as it will appear in the list.

  • permission - a comma delimited list of required permissions in order for this menu item to be active for the current user

  • args - a list of key/value pairs of query string parameters that will be appended to the link associated with this menu item

  • view - valid values are “blog” or “system” and they determine whether the menu item should appear in the blog context menu set or the “System Overview” menu set.

Back