Skip to content

Instantly share code, notes, and snippets.

@splittingred
Forked from BobRay/transport.menu.php
Created April 20, 2012 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save splittingred/2430969 to your computer and use it in GitHub Desktop.
Save splittingred/2430969 to your computer and use it in GitHub Desktop.
MODX menu transport file (for MODX 2.3)
/* will route to the first found of the following:
[namespace-path]controllers/[manager-theme]/index.class.php
[namespace-path]controllers/default/index.class.php
[namespace-path]controllers/index.class.php
*/
$menu= $modx->newObject('modMenu');
$menu->fromArray(array(
'text' => 'mycomponent',
'parent' => 'components',
'description' => 'mycomponent.menu_desc',
'icon' => 'images/icons/plugin.gif',
'menuindex' => 0,
'params' => '',
'handler' => '',
'action' => 'index',
'namespace' => 'mycomponent',
),'',true,true);
return $menu;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment