Commit 5547a732 authored by Benni Mack's avatar Benni Mack Committed by Christian Kuhn
Browse files

[!!!][TASK] Remove HMENU.collapse option

When the "collapse" option in the HMENU ContentObject
is activated, any active page links to its actual parent
page. This option was never touched since TYPO3 4.0
and stems from the time when TYPO3 still included JSMENU
and GMENU_LAYERS functionalities, which is not needed anymore
as more modern solutions such as MenuProcessor for Fluid
are more-widespread.

Resolves: #96517
Releases: main
Change-Id: I7f16369efaaeb17cc9d510307df808aefedd5945

Tested-by: core-ci's avatarcore-ci <>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
parent 37ac299f
.. include:: ../../Includes.txt
Breaking: #96517 - HMENU.collapse Typoscript removed
See :issue:`96517`
The "collapse" TypoScript property of HMENU is removed without
When set, active HMENU items previously linked to their parent page,
which was primarily a use-case for GMENU_LAYERS, which was
removed in TYPO3 6.0.
Setting this TypoScript option has no effect anymore.
Affected Installations
TYPO3 installations with HMENU definitions having this option
set which is highly unlikely.
Use a custom user function or PSR-14 event `FilterMenuItemsEvent` to modify the menu items.
.. index:: Frontend, TypoScript, NotScanned, ext:frontend
\ No newline at end of file
......@@ -1230,15 +1230,9 @@ abstract class AbstractMenuContentObject
// Setting main target
$mainTarget = $altTarget ?: (string)$this->parent_cObj->stdWrapValue('target', $this->mconf ?? []);
// Creating link:
$addParams = ($this->mconf['addParams'] ?? '') . $MP_params;
if (($this->mconf['collapse'] ?? false) && $this->isActive($this->menuArr[$key] ?? [], $this->getMPvar($key))) {
$thePage = $this->sys_page->getPage($this->menuArr[$key]['pid']);
$LD = $this->menuTypoLink($thePage, $mainTarget, $addParams, $typeOverride, $overrideId);
} else {
$addParams .= ($this->I['val']['additionalParams'] ?? '');
$LD = $this->menuTypoLink($this->menuArr[$key], $mainTarget, $addParams, $typeOverride, $overrideId);
// Creating link
$addParams = ($this->mconf['addParams'] ?? '') . ($this->I['val']['additionalParams'] ?? '') . $MP_params;
$LD = $this->menuTypoLink($this->menuArr[$key], $mainTarget, $addParams, $typeOverride, $overrideId);
// Overriding URL / Target if set to do so:
if ($this->menuArr[$key]['_OVERRIDE_HREF'] ?? false) {
$LD['totalURL'] = $this->menuArr[$key]['_OVERRIDE_HREF'];
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment