Project

General

Profile

Actions

Bug #61275

closed

It is not possible to reference TMENUs

Added by Krue Mel over 9 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Could have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2014-08-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

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 1 (0 open1 closed)

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

Actions
Actions #1

Updated by Markus Klein over 9 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
typo3/sysext/frontend/Classes/ContentObject/HierarchicalMenuContentObject.php
before calling the MenuContentObjectFactory.

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

Actions #2

Updated by Helmut Hummel over 9 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?

Actions #3

Updated by Markus Klein over 9 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.

Actions #4

Updated by Alexander Opitz over 9 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?

Actions #5

Updated by Markus Klein over 9 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.

Actions #6

Updated by Alexander Opitz over 9 years ago

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

Actions #7

Updated by Markus Klein over 9 years ago

  • Status changed from Needs Feedback to Rejected

General feature request/evaluation in #63894.

Actions

Also available in: Atom PDF