Function reference: Tabs

mm_renameTab($tab, $newlabel, $roles, $templates)

Renames one of the default tabs within the manager.

$tab: The name of the tab this should apply to. Can only accept single field [Required]
$newlabel: The new text for the label[Required]
$roles: comma separated list of role IDs this should be applied to. Leave empty (or omit) for all roles [Optional - default is all]
$templates: comma separated list of template IDs this should be applied to. Leave empty (or omit) for all templates [Optional - default is all]

mm_renameTab('general', 'Basics', '2'); // Rename the general tab for users with role "2"mm_renameTab('access', 'Access control'); // Rename the access permissions tab to "Access control" for all users

mm_hideTabs($tabs, $roles, $templates)

Hides one or more of the default tabs within the manager.

$tabs: The name(s) of the tab(s) this should apply to. Can accept multiple fields separated by commas [Required]
$roles: comma separated list of role IDs this should be applied to. Leave empty (or omit) for all roles [Optional - default is all]
$templates: comma separated list of template IDs this should be applied to. Leave empty (or omit) for all templates [Optional - default is all]

mm_hideTabs('settings, access'); // Hide the settings and access tabs for all usersmm_hideTabs('access', '1', '3'); // Hide the access control tab for users with role "1" editing documents using template ID "3"

mm_createTab($name, $id, $roles, $templates, $intro, $width)

Creates a new tab within the document editing page

$name: The display name of the new tab [Required]
$id: A unique ID for this tab, so you can reference it later on, if you need to [Required]
$roles: comma separated list of role IDs this should be applied to. Leave empty (or omit) for all roles [Optional - default is all]
$templates: comma separated list of template IDs this should be applied to. Leave empty (or omit) for all templates [Optional - default is all]
$intro: HTML text which appears at the top of the new tab [Optional]
$width:
New width for the content within the tab. If no units are included, they will be assumed to be pixels e.g. "100%" or "450px" [Optional]

mm_createTab('Categories', 'mycats'); // Create a new tab named "Categories" for all users and templatesmm_createTab('Categories', 'mycats', '', '3,4', '<p>How should this document be categorised?</p>', '450'); // Create a new tab 450 pixels wide called categories with an introductory paragraph which is only applied to templates 3 and 4

mm_moveFieldsToTab($fields, $newtab_id, $roles, $templates)

Moves fields (including TVs) to a different tab. However you can't move the following fields: keywords, metatags, which_editor, show_in_menu, menuindex

$fields: The name(s) of the field(s) this should apply to. Can accept multiple fields separated by commas [Required]
$newtab_id: The ID of the tab which the fields should be moved to. Can be one of the default tab IDs (from table above) or a new custom tab created with mm_createTab [Required]
$roles: comma separated list of role IDs this should be applied to. Leave empty (or omit) for all roles [Optional - default is all]
$templates: comma separated list of template IDs this should be applied to. Leave empty (or omit) for all templates [Optional - default is all]

mm_moveFieldsToTab('pub_date,pagetitle', 'mycats'); // Move publication date and page title to the newly created "mycats" tabmm_moveFieldsToTab('pub_date', 'general', '2', ''); // Move the publication date field to the general tab for users with role "2"mm_moveFieldsToTab('tvtags', 'mycats'); // Move the TV "tags" to the new "Categories" tab for all users