I try to make a new module and got most going right but I can not get the left menu to show up at the “new” module page it keep showing up at the first page (Home) when I refresh it here is a snip of the $this->menu array:
$this->menu = array(); // List of menus to add
$r=0;
// Add here entries to declare new menus
// Example to declare a new Top Menu entry and its Left menu entry:
/* BEGIN MODULEBUILDER TOPMENU */
$this->menu[$r]=array(‘fk_menu’=>’’, // ‘’ 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’=>‘JOB’,
‘mainmenu’=>‘jobs’,
‘leftmenu’=>‘1’,
‘url’=>’/jobs/jobsindex.php’,
‘langs’=>‘jobs@jobs’, // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
‘position’=>1000+$r,
‘enabled’=>‘1’, // 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
/* END MODULEBUILDER TOPMENU */
$r++ ;//1
// Example to declare a Left Menu entry into an existing Top menu entry:
// BEGIN MODULEBUILDER LEFTMENU MYOBJECT
$this->menu[$r]=array(‘fk_menu’=>‘r=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’=>‘left’, // This is a Left menu entry
‘titre’=>‘New Job’,
‘mainmenu’=>‘jobs’,
//‘leftmenu’=>‘jobsmenu’,
‘url’=>’/jobs/jobs_card.php’,
‘langs’=>‘jobs@jobs’, // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
‘position’=>1000+$r,
‘enabled’=>’$conf->jobs->enabled’, // Define condition to show or hide menu entry. Use ‘$conf->mymodule->enabled’ if entry must be visible if module is enabled. Use ‘$leftmenu==‘system’’ to show if leftmenu system is selected.
‘perms’=>’$user->rights->jobs->create’, // Use ‘perms’=>’$user->rights->mymodule->level1->level2’ if you ant your menu with a permission rules
‘target’=>’’,
‘user’=>0); // 0=Menu for internal users, 1=external users, 2=both
$r++ ;// 2
Any ideer what I’m doing wrong ??