Bug #33977
closedIndex of count_HMENU_MENUOBJ not incremented in GMENU with linked pictures
0%
Description
I make a Menu using COA and then I insert a GMENU and a TMENU. I use count_HMENU_MENUOBJ for setting up my custom JS-Rollovers.
It works fine for the TMENU, but in the GMENU the counter I use, count_HMENU_MENUOBJ, is always at the same value, 0.
GMENU Item is build like this:NO = 1
NO {
altImgResource.import = uploads/media/
altImgResource.import.field = media
altImgResource.import.listNum = 0
XY = 20,20
format = jpg
quality = 88
10 = IMAGE
10.file = {$filepaths.css}icons/itoctoc20ia.png
10.offset = 0,0
imgParams = class="mmlicon"
ATagTitle.field = description // title
wrap = |
allWrap = |
allStdWrap = |
allStdWrap.dataWrap (
<div id="mlleftframe2NO{register : count_HMENU_MENUOBJ}"...|...
)
}
Here the GIFBUILDER is not invoked.
In file class.tslib_menu.php count_HMENU_MENUOBJ gets +1 only in the code-part where the GIFBUILDER is invoked.
But this is only conditionally the case.
In the present example the condition is not satisfied.
Proposition:
Comment out the lines
$GLOBALS['TSFE']->register['count_HMENU_MENUOBJ']++; $GLOBALS['TSFE']->register['count_MENUOBJ']++;
in function makeGifs($conf, $resKey)
and insert these lines in
function writeMenu() of the GMENU
in the loopfor ($key=0;$key<$this->WMmenuItems;$key++) {
if ($this->result['NO'][$key]['output_file']) {
My modified version of class.tslib_menu.php is attached to this post.
Files