<?php
if ($Itemid == 99999999) {
$database->setQuery("SELECT id FROM #__menu WHERE parent=1");
$Itemid = $database->loadResult();
}
$query = "SELECT menutype FROM #__menu WHERE id = $Itemid";
$database->setQuery($query);
$menu = $database->loadResult();
switch ($menu) {
// need to determine if parent of child;
case "mainmenu":
$query = "SELECT parent FROM #__menu WHERE id = $Itemid";
$database->setQuery($query);
$parentid = $database->loadResult();
if ($parentid == 0) {
$deptid = $Itemid;
// hack used to not get user1 to display on content views after appending Itemid to change dept logo and menu
if ($task == "view") {
$database->setQuery("SELECT id FROM #__menu WHERE menutype='".$menu."' AND parent=$deptid");
$Itemid = $database->loadResult();
}
}
else {
$deptid = $parentid;
}
break;
case "golfmenu":
$deptid = 2;
break;
case "fitnessmenu":
$deptid = 3;
break;
case "tennismenu":
$deptid = 4;
break;
case "diningmenu":
$deptid = 5;
break;
case "marinamenu":
$deptid = 6;
break;
default:
$deptid = 1;
break;
}
$bwheader = $mosConfig_live_site . "/templates/" . $mainframe->getTemplate() . "/images/bwheader_" . $deptid . ".jpg";
<div class="horizmenu">
<?php mosShowHorizMenuID('mainmenu', $deptid); ?>
</div>
<div class="submenu">
<?php mosShowSubMenuID( 'mainmenu', $deptid ); ?>
</div>
function mosShowHorizMenuID( $menutype, $hilightid) {
......
$hilightid = $hilightid;
Time to create page: 0.060 seconds