Bug #87130

TMENU target is not working

Added by David Bruchmann 8 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2018-12-12
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

According to the documentation https://docs.typo3.org/typo3cms/TyposcriptReference/latest/MenuObjects/Tmenu/Index.html for a TMENU a target can be entered.
In Version 9.5.1 this has no impact.

        20 = HMENU
        20 {

            entryLevel = 0

            1 = TMENU
            1 {
                target = _top

                NO {
                    text = nav_title // title
                    wrapItemAndSub = <li>|</li>
                }
            }
        }

Also 'altTarget' for TMENUITEM is not working

        20 = HMENU
        20 {

            entryLevel = 0

            1 = TMENU
            1 {
                target = _top

                NO {
                    text = nav_title // title
                    wrapItemAndSub = <li>|</li>
                    altTarget = someTarget
                }
            }
        }

Associated revisions

Revision 4de8b53c (diff)
Added by Benni Mack 5 months ago

[BUGFIX] Re-enable target attribute for links in menus

The new pagelink builder does not set the lastTypoLinkLD options
which is used in HMENUs. The patch properly sets
the lastTypoLink* properties of ContentObjectRenderer in typolink
again, making target overrides in menus work again.

Resolves: #87130
Releases: master, 9.5
Change-Id: Ia284e546179dfaec8ec8ecb86a36d38f3b81aad8
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60292
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Tested-by: Frank Naegler <>
Reviewed-by: Georg Ringer <>
Reviewed-by: Frank Naegler <>

Revision d181eb9e (diff)
Added by Benni Mack 5 months ago

[BUGFIX] Re-enable target attribute for links in menus

The new pagelink builder does not set the lastTypoLinkLD options
which is used in HMENUs. The patch properly sets
the lastTypoLink* properties of ContentObjectRenderer in typolink
again, making target overrides in menus work again.

Resolves: #87130
Releases: master, 9.5
Change-Id: Ia284e546179dfaec8ec8ecb86a36d38f3b81aad8
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60313
Tested-by: TYPO3com <>
Tested-by: Frank Naegler <>
Reviewed-by: Frank Naegler <>

History

#1 Updated by David Bruchmann 8 months ago

  • Description updated (diff)

#2 Updated by David Bruchmann 8 months ago

  • Description updated (diff)

#3 Updated by Christoph Lehmann 8 months ago

The target can be defined in page settings in tab behaviour. I think the documentation is not up-to-date.

Do you see a usecase for setting target via TypoScript?

#4 Updated by David Bruchmann 8 months ago

In any frame-solution no matter if frame or iframe I think the solution by typoscript would be quite reasonable.
The updated page where I'd need it never needs it urgently but it's a single use-case and can't be generalized.
By stdWrap it still would be possible to implement it somehow but that's not straight forward and would be a bit ugly and probably slowing down parsing of the typoscript.

#5 Updated by Gerrit Code Review 5 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60292

#6 Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60313

#7 Updated by Benni Mack 5 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#8 Updated by Benni Mack 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF