Bug #17027
closedGMENU imgNameNotRandom doesn't work with special=language
0%
Description
The title tells it all.
The reason for this behaviour is that a menu using imgNameNotRandom relies on the page ids, which are not necessarily unique for a language menu - actually they probably very rarely are.
This might be true for other HMENU "special" properties as well: Those differ by the variable $key in function tslib_gmenu::writeMenu of class.tslib_menu.php
Attached patch solves the problem by adding the key to the JS variable name for an image but not the "random" md5 string.
Patched against typo3/sysext/cms/tslib/class.tslib_menu.php
(issue imported from #M5053)
Files
Updated by Ralf Hettinger over 17 years ago
Addendum: The described problem is also an issue with TMENU and beforeImg/beforeROimg set.
Please use class.tslib_menu.php.diff2 to solve the problem for GMENU as well as TMENU.
Updated by Oliver Hader over 17 years ago
I can confirm this issue.
If you have two items on the same page linking to the same page-id, the rollover won't work anymore, thus imgNamePrefix has to be used additonally.
e.g.
10 = HMENU
10 {
special = directory
special.value = 123
1 = GMENU
1 {
imgNameNotRandom = 1
imgNamePrefix = first
...
}
# copy the first GMENU
20 < 10.10
20.1.imgNamePrefix = second
}
Updated by Oliver Hader over 17 years ago
I just added two patch versions for the 4.1 and 4.0 branch.
Updated by Ralf Hettinger over 17 years ago
Thank You for the patches, Oliver.
"[...] thus imgNamePrefix has to be used additonally. [...]"
Just commenting: Without patching, this won't solve the issue either for special=language, since the imgNamePrefix will be the same for all language menu items.
Updated by Oliver Hader over 17 years ago
You're right. A RFC was sent to the core developer list.
Updated by Oliver Hader over 17 years ago
- TYPO3_4-1 (rev. 2390)
- Trunk (rev. 2391)