[TYPO3] getText for TMENUITEM (was: Retrieving TS value inside other TS code)

Francois Suter fsuter at cobweb.ch
Tue Nov 7 17:51:37 CET 2006


Hi,

> Ok, I see--I think. But am I right to understand that any given page
> in a menu should have the same class as others in the rootline (i.e.
> that a level 1 page and all its children need to share the same
> class)?

Yes, that's the idea.

> If so, then you should be able to get away with using an existing,
> unique field such as uid:
>
> lib.somemenu.1.NO.stdWrap2.dataWrap = <li class="branch_{leveluid: 
> 1}">|</li>

Something like that. The reason I wanted to use some other field or  
parameter, was to have a more explicit name rather than just an id.

But, in the meantime, I discovered some things about getText, if I'm  
not mistaken. When used in the context of a TMENUITEM, the getText  
function does not always refer to the page being processed as a menu  
item.

page:title will display the title of the page being displayed
field:title will display the title of the page being processed as a  
TMENUITEM

Alas, all the slide functions (leveluid, levelfield, etc.) relate to  
the page being displayed and not the page being processed. So it  
seems it is not possible to travel up each menu item's rootline to  
find the category it belongs to or the uid of the level 1 page as you  
suggested.

This seems very surprising and I do hope that there is a solution  
that I have overlooked.

Cheers

François Suter
Directeur technique
-----------------------------------------------------
Cobweb Development Sàrl
www.cobweb.ch
-----------------------------------------------------




More information about the TYPO3-english mailing list