Bug #61275

It is not possible to reference TMENUs

Added by Krue Mel about 5 years ago. Updated almost 5 years ago.

Could have
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


A TMENU can not be referenced:

lib.navigationMenu.stdLevel = TMENU
lib.navigationMenu.stdLevel {
wrap = <ul>|</ul>
NO = 1
NO.wrapItemAndSub = <li>|</li>
ACT = 1
ACT.wrapItemAndSub = <li class="active">|</li>
CUR = 1
CUR.wrapItemAndSub = <li class="current">|</li>

lib.navigationMenu.level_0 =< lib.navigationMenu.stdMenu
lib.navigationMenu.level_0.10 {
entryLevel = 0
1 =< lib.navigationMenu.stdLevel # this reference is not working
1.wrap >

Replacing the reference operator with the copy operator words as expected.

Related issues

Related to TYPO3 Core - Feature #63894: Evaluate reference handling on TS parser level New 2014-12-14


#1 Updated by Markus Klein about 5 years ago

  • Status changed from New to Accepted
  • Complexity set to medium

After checking the code it is clear to me why that happens:
typo3/sysext/frontend/Classes/ContentObject/Menu/MenuContentObjectFactory.php::getMenuObjectByType($type) expects $type to be a menu type name like TMENU, but in case of a reference this will be '< lib.....'.

Reference support has to be implemented into
before calling the MenuContentObjectFactory.

Unfortunately I don't know the TS API to handle such references, so somebody else needs to take a look.

#2 Updated by Helmut Hummel about 5 years ago

  • Status changed from Accepted to Needs Feedback

References only work on content object level, nowhere else.

So this works:

lib.foo = TEXT
lib.foo.value = Bar

page.10 =< lib.foo

This does not work:

lib.foo = TEXT
lib.foo.value = Bar

page.10 = TEXT
page.10.value =< lib.foo.value

The reason for that is, that the implementation of references is only done in ContentObjectRenderer::cObjGetSingle() and the only case that is checked there is if the first level is a reference.

A TMENU is not a content object, but a menu object, thus it does not work there, same as it does not work in any other place in TS (except top level content objects).

Implementing this now only for menu objects might be possible at cost of performance (TS-Parser needs to be triggered) and at cost of consistency.
Implementing this on a parser level would be consistent, but I'm not sure if this is really doable with the current parser code.

So what should we do with this one?

#3 Updated by Markus Klein about 5 years ago

  • Priority changed from Must have to Could have
  • Target version deleted (next-patchlevel)

Thanks Helmut for clarifying this.
I agree that we should strive for consistency first place!

Moreover the menu generation is already really slow, so don't slow it down even further.

#4 Updated by Alexander Opitz almost 5 years ago

I would like to close this issue, as implementation is only possible with reduction of performance for everyone.

Is it ok to close this feature request?

#5 Updated by Markus Klein almost 5 years ago

I would close this one and create a new one "Evaluate reference handling on TS parser level" with a reference to this one.
In the new ticket we can check then if such an implementation is doable or not.

#6 Updated by Alexander Opitz almost 5 years ago

@Markus Ok, so doing so is fine with me.

#7 Updated by Markus Klein almost 5 years ago

  • Status changed from Needs Feedback to Rejected

General feature request/evaluation in #63894.

Also available in: Atom PDF