[TYPO3-core] RFC #11224: Special menu directory only renders 1st level if special.value is a mount point

Xavier Perseguers typo3 at perseguers.ch
Fri Sep 18 12:29:40 CEST 2009


Hi François,

>> Solution:
>> Make sure to "slide-down" mount point information (_MP_PARAM) to 
>> children record in the rootline otherwise isNext() method will never 
>> return TRUE and submenus won't be generated.
> 
> +1 after testing. Not +1 after reading yet as I would like more 
> explanations about the test you introduced:
> 
> if (!count($nextMParray) && 
> !$this->tmpl->rootLine[$currentLevel]['_MOUNT_OL'] && $currentLevel > 0) {
> 
> Could you explain what you are testing here exactly? A comment should be 
> added to that piece of code, so that it's meaning is clear.

It will be quite hard as the code I modified was already a bit magic ;-) I made this patch by t3lib_div::debug'ing $this->tmpl->rootline.

The point is that in case of sysfolder with mount point, $nextMParray is not set correctly. This is what I test. $currentLevel > 0 tests that we are in the mounted part of the tree and 
!count($nextMParray) that the definition of the mount point is not set properly while $this->tmpl->rootline[$currentLevel]['_MOUNT_OL'] is the same test as (Kasper?) wrote.

I realize that I mixed up code cleanup in the part I updated and real "addition" of code meaning the patch is a bit harder to read but I'm sure you will see what "really" changed and I promise that I 
won't mix-up code cleanup and bug fix in a single patch (after all this patch is pending since a few months. I did not know all CGL as well as today ;-)

Regards

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-team-core mailing list