Bug #67047

Bug #85138: Shortcut in menu always is rendered as inactive

Cannot access shortcut target in menus

Added by Mathias Brodala over 4 years ago. Updated 7 days ago.

Status:
Resolved
Priority:
Must have
Category:
Localization
Target version:
-
Start date:
2015-05-20
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

With #36822 links via overlaid shortcuts have been fixed but the original menu item data was kept unchanged.

This makes it impossible to e.g. mark active menu items with pure TypoScript. An override is not useful since both CONTENT as well as RECORDS perform overlays too.


Related issues

Related to TYPO3 Core - Bug #36822: Invalid shortcut target on translated pages Closed 2012-05-03
Related to TYPO3 Core - Feature #80841: MenuProcessor is missing an option to mark shorcuts as active or current New 2017-04-13
Related to TYPO3 Core - Bug #69454: Shortcut page ignores the configured url target New 2015-09-01

Associated revisions

Revision f9badf9b (diff)
Added by Mathias Brodala 7 days ago

[BUGFIX] Fix translated shortcut target in menus

This ensures that the target of translated "shortcut" pages is
properly available. Normally this value is lost due to language
overlay thus the original page record needs to be retrieved to
restore the original shortcut target.

Now it is possible to e.g. mark shortcut menu items as active
on translated pages.

Resolves: #67047
Related: #36822
Releases: master, 9.5
Change-Id: I2cabc252ba1936763d6cbe1fe0a093aa74f5a4e1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/39630
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Tested-by: Susanne Moog <>
Reviewed-by: Benni Mack <>
Reviewed-by: Susanne Moog <>

Revision 9735a3ac (diff)
Added by Mathias Brodala 7 days ago

[BUGFIX] Fix translated shortcut target in menus

This ensures that the target of translated "shortcut" pages is
properly available. Normally this value is lost due to language
overlay thus the original page record needs to be retrieved to
restore the original shortcut target.

Now it is possible to e.g. mark shortcut menu items as active
on translated pages.

Resolves: #67047
Related: #36822
Releases: master, 9.5
Change-Id: I2cabc252ba1936763d6cbe1fe0a093aa74f5a4e1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62477
Tested-by: TYPO3com <>
Tested-by: Susanne Moog <>
Reviewed-by: Susanne Moog <>

History

#1 Updated by Gerrit Code Review over 4 years 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 http://review.typo3.org/39630

#2 Updated by Mathias Brodala over 4 years ago

Example code to mark active menu items including shortcuts:

// For "Menu of subpages of selected pages" 
tt_content.menu.20.1.1 {
  // Disable link and add active class for menu items of the current page
  ACT < .NO
  ACT = 1
  ACT {
    doNotLinkIt = 1
    wrapItemAndSub = <li class="active"><a>|</a></li>
  }
  // Do the same for page shortcut menu items
  NO.wrapItemAndSub.stdWrap.override < .ACT.wrapItemAndSub
  NO.wrapItemAndSub.stdWrap.override.if {
    // 1st condition: value of field "doktype" must be 4 (shortcut)
    value.field = doktype
    equals = 4
    // 2nd condition: only true if nested condition is true
    isTrue = 1
    // Nested condition: value of field "shortcut" must be the current page
    isTrue.if {
      value.field = shortcut
      equals.data = TSFE:id
    }
  }
  NO.doNotLinkIt.stdWrap.override < .ACT.doNotLinkIt
  NO.doNotLinkIt.stdWrap.override.if < .NO.wrapItemAndSub.stdWrap.override.if
}

#3 Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39630

#4 Updated by Gerrit Code Review about 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39630

#5 Updated by Mathias Schreiber about 4 years ago

  • Target version deleted (next-patchlevel)

#6 Updated by Gerrit Code Review almost 4 years ago

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

#7 Updated by Gerrit Code Review almost 4 years ago

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

#8 Updated by Gerrit Code Review over 3 years ago

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

#9 Updated by Susanne Moog about 2 years ago

  • Category changed from Content Rendering to Localization

#10 Updated by Simon Gilli over 1 year ago

  • Parent task set to #85138

#11 Updated by Riccardo De Contardi over 1 year ago

  • Related to Feature #80841: MenuProcessor is missing an option to mark shorcuts as active or current added

#12 Updated by Riccardo De Contardi over 1 year ago

  • Related to Bug #69454: Shortcut page ignores the configured url target added

#13 Updated by Gerrit Code Review about 1 year ago

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

#14 Updated by Gerrit Code Review 12 months ago

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

#15 Updated by Gerrit Code Review 28 days ago

Patch set 9 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/+/39630

#16 Updated by Gerrit Code Review 7 days 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/+/62477

#17 Updated by Mathias Brodala 7 days ago

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

Also available in: Atom PDF