Project

General

Profile

Actions

Bug #17730

closed

optionSplit for nested / recursive HMENU

Added by Ralf Hettinger about 17 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-10-28
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Any optionSplit applied to a nested (i.e. recursive) HMENU menu object will not be evaluated at right scope but on scope of outermost HMENU.

Could be solved in class.t3lib_tstemplate.php

What is a nested/recursive HMENU and how do I create one?

Image you have a TMENU and some configuration (not functional, just a scheme) like
TMENU {
NO {
stdWrap.cObject = HMENU
stdWrap.cObject {
1 = TMENU
1 {
wrapItemAndSub = |*|<li class="odd">|</li> || <li class="even">|</li> |*|
}
}
}
}

Meaning that you want to create a TMENUITEM as another HMENU and within this (nested) HMENU you want to perform an optionSplit into even and odd items.

You soon will recognize that this doesn't work as expected, since the optionSplit is resolved based on the items at outermost HMENU.

This is because t3lib_tstemplate->splitConfArray resolves optionSplits recursively as soon as an array with such splits is passed to it (which is the case at the outermost HMENU).

The attached patch stops recurisve replacement of optionSplits, if they are within a HMENU configuration array. These arrays represent a nested HMENU and should be evaluated later when building this nested menu.
(issue imported from #M6605)


Files

6605_4.1.3.patch (1.68 KB) 6605_4.1.3.patch Administrator Admin, 2007-10-28 15:06
Actions #1

Updated by Ferdinand Kuhl about 15 years ago

This does not seem to be complete. If I use the split function of stdWrap the issues still applies. (For example using a stdWrap split in an HMENU)

Actions #2

Updated by Jo Hasenau about 15 years ago

Changing this behaviour will contradict the principle of optionSplit being applied to any property of a menu item. It's not a bug but a feature that a HMENU element placed within a menu item uses optionSplit of the parent element, which has been used for lots of different websites we did since 2003.

So if this behaviour will be changed now, updating will break these sites. If you really want to change it, it must be part of a "compatibility mode" setting.

Actions #3

Updated by Ralf Hettinger about 15 years ago

@Ferdinand Smith: will have a look at this, thank you.

@Jo: I agree, you are absolutely right. So the severity should be changed from minor to feature - and the patch needs additional work so it's outcome has to be activated before by some extra TS parameter. Thanks as well.

Actions #4

Updated by Alexander Opitz over 11 years ago

  • Category deleted (Communication)
  • Status changed from New to Needs Feedback
  • Target version deleted (0)

As this report is very old, is the handling in newer TYPO3 CMS Versions (like 6.0/6.1) more like you expect it?

Actions #5

Updated by Alexander Opitz about 11 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions

Also available in: Atom PDF