You can add CMS menu items to an individual site's CMS by adding a CustomSideBarMenu class to the site's config folder.

[path_to_site]/config/customsidebarmenu.class.php

The class will be structured as follows

<?php

class CustomSideBarMenu {

	public static function updateSidebar($registry){
	
		$registry->addSideBarMenuItem(
			'example' , 
			array(
				'view_area' => 'example' ,
				'path' => '/admin/example' ,
				'title' => 'Example' ,
				'tooltip' => 'Example custom menu item' ,
				'icon' => 'glyphicon glyphicon-education' ,
				'priv' => '' ,
				'submenu' => array (
					array (
						'view_area' => 'examplesubmenuitem1' ,
						'path' => '/admin/example/examplesubmenuitem1' ,
						'title' => 'Example Sub Menu Item 1' ,
						'tooltip' => '' ,
						'priv' => ''
					) ,
					array (
						'view_area' => 'examplesubmenuitem2' ,
						'path' => '/admin/example/examplesubmenuitem2' ,
						'title' => 'Status Report' ,
						'tooltip' => 'Example Sub Menu Item 2' ,
						'priv' => 'EXAMPLE_PRIV'
					)
				)
			) , 
			$after=null , 
			$before='document'
		);
	
	}

}

?>

$registry->addSideBarMenuItem arguments

$menu_id (string)

Lowercase a-z,_ : Unique id for the menu area

$menu_structure (array)

view_area
Lowercase a-z,_ : Unique id for the menu area
path
URL path which the menu item links to to. Root relative.
title
The menu item text.
tooltip
The menu item tooltip. It empty, no tooltip shown.
icon
The icon top be used for this menu item. Selected from the bootstrap glyphicons
priv
Uppercase A-Z,_ : Does this menu item require a specific user privilege to access it? If empty, no privilege will be required
submenu
Does this item have any submenu items? If so, they will appear in an array here.

$after (string)

Specific item id in the existing menu which this will appear after, or null.

$before (string)

Specific item id in the existing menu which this will appear before, or null.

Contact Us

Address: 22a Fishergate York, YO10 4AB · Tel: 01904 636677 · Email: info@dotadmin.com