From f4c0c5a634662b8be501661f481df2dc519559f9 Mon Sep 17 00:00:00 2001 From: Benjamin Kott <benjamin.kott@wfp2.com> Date: Sun, 7 May 2017 19:33:30 +0200 Subject: [PATCH] [BUGFIX] Respect link target for individual pages in menu generation The link target configuration for a page was ignored during menu generation. The link target is now respected and will override the defined link target for the menu. Resolves: #81162 Releases: master, 8.7 Change-Id: Iecf45456942c998e4084b95fe3003d2c5dc038db Reviewed-on: https://review.typo3.org/52735 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de> Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de> Reviewed-by: Christer V <cvi@systime.dk> Reviewed-by: Elmar Hinz <t3elmar@gmail.com> Reviewed-by: Jan Helke <typo3@helke.de> Tested-by: Jan Helke <typo3@helke.de> --- .../Classes/ContentObject/Menu/AbstractMenuContentObject.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php index 448a11313a26..7635ed57d44a 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php +++ b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php @@ -1612,6 +1612,10 @@ abstract class AbstractMenuContentObject $addParams .= $this->I['val']['additionalParams'] . $this->menuArr[$key]['_ADD_GETVARS']; $LD = $this->menuTypoLink($this->menuArr[$key], $mainTarget, '', '', $overrideArray, $addParams, $typeOverride); } + // Override default target configuration if option is set + if ($this->menuArr[$key]['target']) { + $LD['target'] = $this->menuArr[$key]['target']; + } // Override URL if using "External URL" if ($this->menuArr[$key]['doktype'] == PageRepository::DOKTYPE_LINK) { if ($this->menuArr[$key]['urltype'] == 3 && GeneralUtility::validEmail($this->menuArr[$key]['url'])) { -- GitLab