Index: typo3/sysext/cms/tslib/class.tslib_menu.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_menu.php (revision 6485) +++ typo3/sysext/cms/tslib/class.tslib_menu.php (working copy) @@ -2888,10 +2888,6 @@ $pid = $mount_info['mount_pid']; } - // Set "&MP=" var: - $MP_var = implode(',',$MP_array); - $MP_params = $MP_var ? '&MP='.rawurlencode($MP_var) : ''; - // UIDs to ban: $banUidArray = $this->getBannedUids(); @@ -2904,11 +2900,22 @@ $menuItems = is_array($menuItemArray) ? $menuItemArray : $this->sys_page->getMenu($pid); foreach($menuItems as $uid => $data) { + + // $data['_MP_PARAM'] contains MP param for overlay mount points (MPs with "substitute this page" set) + // if present: add param to copy of MP array (copy used for that submenu branch only) + if(array_key_exists('_MP_PARAM', $data) && $data['_MP_PARAM']) { + $MP_array[] = $data['_MP_PARAM']; + } + // Set "&MP=" var: + $MP_var = implode(',', $MP_array); + $MP_params = $MP_var ? '&MP=' . rawurlencode($MP_var) : ''; + $spacer = (t3lib_div::inList($this->spacerIDList,$data['doktype'])?1:0); // if item is a spacer, $spacer is set if ($this->mconf['SPC'] || !$spacer) { // If the spacer-function is not enabled, spacers will not enter the $menuArr