Bug #67047
closed
Bug #85138: Shortcut in menu always is rendered as inactive
Cannot access shortcut target in menus
Added by Mathias Brodala almost 9 years ago.
Updated over 4 years ago.
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.
- 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
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
}
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
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
- Target version deleted (
next-patchlevel)
- Category changed from Content Rendering to Localization
- Parent task set to #85138
- Related to Feature #80841: MenuProcessor is missing an option to mark shorcuts as active or current added
- Related to Bug #69454: Shortcut page ignores the configured url target added
- Status changed from Under Review to Resolved
- % Done changed from 50 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF