From 824f9c5a94c43a181e966ef4a2534f6974e94a05 Mon Sep 17 00:00:00 2001 From: Nick Palmer Date: Thu, 27 Sep 2007 10:53:32 +0000 Subject: Allow no_menu and structure_id arguments to the module. --- modules/mod_category_suckerfish.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/mod_category_suckerfish.php b/modules/mod_category_suckerfish.php index 09e120b..e711efd 100644 --- a/modules/mod_category_suckerfish.php +++ b/modules/mod_category_suckerfish.php @@ -1,13 +1,13 @@ isPackageActive('pigeonholes')) { if (!empty($module_params['root_structure_id'])) { $listHash['root_structure_id'] = $module_params['root_structure_id']; } - - $l = $p->getList($listHash); + if (!empty($module_params['structure_id'])) { + $l = array(array('structure_id' => $module_params['structure_id'])); + } + else { + $l = $p->getList($listHash); + } foreach ($l as $e) { $d = $s->getSubTree( $e['structure_id'] ); $d_o = array(); @@ -67,8 +71,8 @@ if($gBitSystem->isPackageActive('pigeonholes')) { if (!defined('MENU_LEVELS_DEFINED')) { function menuLevels($levels, $l) { - global $gContent, $module_rows; - if (!$l) { + global $gContent, $module_rows, $module_params; + if (!$l && empty($module_params['no_menu'])) { $ret = '