Context menu for the sidebar.
Array, default = []
You can use this property if you want to define a context menu for the sidebar. Internally, context menu is implemented using $().w2menu plugin that similar to $().w2overlay() and located in w2utils. This array holds objects of the following structure: item = { id : 1, // unique id text : 'caption', // caption img : null, // name of the image if any icon : null // name of the icon font if any } You can define it during object creation: $('#sidebar').w2sidebar({ name : 'sidebar', menu : [ { id: 1, text: 'Item 1', img: 'icon-page' }, { id: 2, text: 'Item 2', img: 'icon-page' }, { id: 3, text: 'Item 3', img: 'icon-page' }, ], nodes: [ { id: 'id-1', text: 'Level 1', hidden: true }, { id: 'id-2', text: 'Level 2', expanded: true, nodes: [ { id: 'id-2-1', text: 'Level 2.1' }, { id: 'id-2-2', text: 'Level 2.2' } ]}, { id: 'id-3', text: 'Level 3' } ] }); Or any time after the object has been created: w2ui['sidebar'].menu = [ { id: 1, text: 'Item 1', img: 'icon-page' }, { id: 2, text: 'Item 2', img: 'icon-page' }, { id: 3, text: 'Item 3', img: 'icon-page' }, ];