Desarrollo de un módulo: Difference between revisions

Jump to navigation Jump to search
Line 292: Line 292:
'titre'=>'MyModule top menu',
'titre'=>'MyModule top menu',
'mainmenu'=>'mymodule',
'mainmenu'=>'mymodule',
'leftmenu'=>'1', // Use 1 if you also want to add left menu entries using this descriptor. Use 0 if left menu entries are defined in a file pre.inc.php (old school).
'leftmenu'=>'mymodule',
'url'=>'/mymodule/pagetop.php',
'url'=>'/mymodule/pagetop.php',
'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
Line 303: Line 303:


// Example to declare a Left Menu entry:
// Example to declare a Left Menu entry:
$this->menu[$r]=array( 'fk_menu'=>'r=0', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=xxx',     // 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
'type'=>'left',         // This is a Left menu entry
'titre'=>'MyModule left menu 1',
'titre'=>'MyModule left menu 1',
'mainmenu'=>'mymodule',
'mainmenu'=>'xxx',
                        'leftmenu'=>'mymodule',
'url'=>'/mymodule/pagelevel1.php',
'url'=>'/mymodule/pagelevel1.php',
'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.

Navigation menu