Hi Folks,
I am developing a new module to maintain an online dictionary website from inside the Dolibarr CRM. I have success fully create top menu entry for my module. The top menu entry code inside the mymodule class is…
$this->menu[$r++]=array('fk_menu'=>0, // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'top', // This is a Top menu entry
'titre'=>'ALDictionary',
'mainmenu'=>'ALDictionary',
'leftmenu'=>'ALDictionary',
'url'=>'/ALDictionary/index.php',
'langs'=>'ALDictionary@ALDictionary', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>$conf->ALDictionary->enabled, // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both
Now i got stuck with ;left menu entry. I tried several way to to get a left menu entry but did not got. Here is my left menu entry code.
$this->menu[$r++]=array('fk_menu'=>'r=0',
'type'=>'left',
'titre'=>'MyWidget',
'mainmenu'=>'ALDictionary',
'url'=>'/ALDictionary/scripts/card.php?mainmenu=ALDictionary&leftmenu=ALDictionary&action=create',
'langs'=>'ALDictionary@ALDictionary',
'position'=>1000+$r,
'perms'=>'1',
'enabled'=>'$conf->ALDictionary->enabled',
'target'=>'',
'user'=>2);
While i disable and re enable the module nothing i can see in the left side of the Dolibarr.
Please help me.