Issue Bug Closed

#102349Add Event/Hook/Whatever to modify menu item results

Stefan Froemken 11/08/23, 13:02 updated 01/16/24, 08:48

Description

Hello,

customer want’s me to hide items of a pages language menu, if there is no translation for a desired record in detailview.

As a solution I found following link:
https://gist.github.com/birger-fuehne/a8a97c94ec9346d691174462ccbfcfcc

But this solution needs access to property “itemArrayProcFunc” which is marked as invalid in TYPO3s LanguageMenuProcessor. Can you please allow that property in LanguageMenuProcessor?

A second solution could be adding an Event to that position:
https://github.com/TYPO3/typo3/blob/12.4/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php#L407

That way the amount of items is still correct and caching should be fine.

Stefan

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.