#17158HMENU doesn't work with special=userfunction and expAll
Description
The generated menu displays sub-pages for each item which doesn’t have a _SUB_MENU entry in the given menuArr.
The added sub-pages are taken from the page tree.
This behaviour can be reproduced by using the function makeMenuArray from the TSref and some TS code like the following (you need also to have some pages created at level 1) :
includeLibs.tx_ameos_navigation = fileadmin/class.tx_ameos_navigation.php
lib.menu_haut = HMENU
lib.menu_haut {
entryLevel = 0
special = userfunction
special.userFunc = tx_ameos_navigation->makeMenuArray
1 = TMENU
1 {
expAll = 1
NO.allWrap = 1>|<br>
}
2 = TMENU
2 {
expAll = 1
NO.allWrap = 2->|<br>
}
3 = TMENU
3 {
expAll = 1
NO.allWrap = 3—>|<br>
}
}
The joined patch adds a new test which allows the the generation of the sub pages only if there is a _SUB_MENU entry.
Is this the right way to correct this or are there any hidden things ?
I’m not sure everything is right this way because start and makeMenu should use the HMENU array and also check for _SUB_MENU and this is not the case …
(issue imported from #M5304)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.