From 102dbc3f7827611443a29ea45e399677f5cf086c Mon Sep 17 00:00:00 2001 From: sallyx Date: Sat, 21 May 2016 20:39:29 +0200 Subject: [PATCH] Updated for newer modx version (tested on 2.5) set correct assets path set the menu action and namespace --- _build/build.transport.php | 4 ++-- _build/data/transport.menu.php | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/_build/build.transport.php b/_build/build.transport.php index 3d19fa6..8958c5f 100644 --- a/_build/build.transport.php +++ b/_build/build.transport.php @@ -44,7 +44,7 @@ $modx->loadClass('transport.modPackageBuilder','',false, true); $builder = new modPackageBuilder($modx); $builder->createPackage(PKG_NAME_LOWER,PKG_VERSION,PKG_RELEASE); -$builder->registerNamespace(PKG_NAME_LOWER,false,true,'{core_path}components/'.PKG_NAME_LOWER.'/'); +$builder->registerNamespace(PKG_NAME_LOWER,false,true,'{core_path}components/'.PKG_NAME_LOWER.'/', '{core_path}assets/'.PKG_NAME_LOWER.'/'); /* create category */ $category= $modx->newObject('modCategory'); @@ -127,4 +127,4 @@ $tend= $tend[1] + $tend[0]; $totalTime= sprintf("%2.4f s",($tend - $tstart)); $modx->log(modX::LOG_LEVEL_INFO,"\n
Package Built.
\nExecution time: {$totalTime}\n"); -exit (); \ No newline at end of file +exit (); diff --git a/_build/data/transport.menu.php b/_build/data/transport.menu.php index 4739dd2..57293c8 100644 --- a/_build/data/transport.menu.php +++ b/_build/data/transport.menu.php @@ -10,7 +10,7 @@ 'id' => 1, 'namespace' => 'doodles', 'parent' => 0, - 'controller' => 'controllers/index', + 'controller' => 'index', 'haslayout' => true, 'lang_topics' => 'doodles:default', 'assets' => '', @@ -25,8 +25,10 @@ 'menuindex' => 0, 'params' => '', 'handler' => '', + 'action' => 'index', + 'namespace' => 'doodles' ),'',true,true); -$menu->addOne($action); +// $menu->addOne($action); -- this is how it worked in older modx unset($menus); -return $menu; \ No newline at end of file +return $menu;