[TYPO3-english] References to TMENU's not working
bernd wilke
t3ng at bernd-wilke.net
Mon Sep 1 09:15:21 CEST 2014
Am 29.08.14 14:44, schrieb Krue Mel:
> Hi!
>
> I recently discovered that it is not possible to use references to
> TMENU's in Typo3 CMS 6.2.4.
>
> I'm trying to reuse a TMENU which is defined like this:
>
> lib.navigationMenu.stdItem = TMENU
> lib.navigationMenu.stdItem {
> 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>
> }
>
> I'm want to reference this object inside a HMENU:
>
> lib.navigationMenu.level_0 =< lib.navigationMenu.stdMenu
> lib.navigationMenu.level_0.10 {
> entryLevel = 0
> 1 =< lib.navigationMenu.stdItem
> 1.wrap >
> }
>
> But this is not working, no menu is shown.
>
> If I replace the reference operator with the copy operator like this:
>
> lib.navigationMenu.level_0 =< lib.navigationMenu.stdMenu
> lib.navigationMenu.level_0.10 {
> entryLevel = 0
> 1 < lib.navigationMenu.stdItem
> 1.wrap >
> }
>
> It will work as it should. I would expect a reference to work there.
> Does Typo3 handle a reference to a TMENU differently?
yes, as the nature of a reference is something other than a copy.
in your shown example you modified the referenced TS by removing the wrap.
maybe you reference your lib.navigationMenu.stdItem multiple times - and
always change it. so you have only one referenced lib-object where all
these modifications accumulate.
bernd
--
http://www.pi-phi.de/cheatsheet.html
More information about the TYPO3-english
mailing list