{{tag>Programmers_Reference Client_Side_Plugins Modify_Visual_Perspectives_Menus Visual_Perspectives Menus}} [<10>] ====== Modifying default behavior of menu in visual perspectives ====== The idea here is very similar. You have two scripts available – initialization and render scripts. The initialization script has a chance to modify the configuration of the menu widgets (almost all menu types except Plain List are implemented by their own Kendo UI widget (see the table below). The render script can call the methods of the widget once it has been drawn. The following objects are exposed to the initialization script: * "config" – this object represents Kendo UI configuration of the menu widget * "parser" – the controller object (''AwareApp_VPParser'') – see the code in the file ''AwareIM/Tomcat/webapps/AwareIM/aware_kendo/parsers/vpParser.js'' For example to add some custom menu item to a toolbar menu you could write the following script: config.items.push ({ type: "button", spriteCssClass: "fa fa-edit", text: "My Menu Item", click: function () { alert ("this is my menu item"); } }); ^Menu type^Kendo UI widget^Kendo UI reference^ ^Toolbar|ToolBar| [[http://docs.telerik.com/kendo-ui/api/javascript/ui/toolbar|http://docs.telerik.com/kendo-ui/api/javascript/ui/toolbar]]| ^Standard Menu|Menu| [[http://docs.telerik.com/kendo-ui/api/javascript/ui/menu|http://docs.telerik.com/kendo-ui/api/javascript/ui/menu]]\\ | ^Panel Bar|PanelBar| [[http://docs.telerik.com/kendo-ui/api/javascript/ui/panelbar|http://docs.telerik.com/kendo-ui/api/javascript/ui/panelbar]]| ^Tree|TreeView| [[http://docs.telerik.com/kendo-ui/api/javascript/ui/treeview|http://docs.telerik.com/kendo-ui/api/javascript/ui/treeview]]| {{simplenavi>docs:3500:0800:0860:}}