[TYPO3] index or counter in TMENU

JoH info at cybercraft.de
Thu Jun 8 00:31:42 CEST 2006


> Does anyone know how to get the index of the TMENU elements in a
> TMENU?  So if I have a TMENU with five items, is there a way to spit
> out the 5 (or 4 if it is zero indexed) in the HTML for the 5th
> element?
>
> I'm creating JavaScript in my menus and I need the elements to have
> unique Ids.  Right now I'm using the uid, but it would simplify
> things a lot if I had sequential ids that started at 0 or 1.

try something like this:

NO {
    allWrap.cObject = TEXT
    allWrap.cObject.value = |
    allWrap.dataWrap = <li class="item{register:count_HMENU_MENUOBJ}">|</li>
}

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de





More information about the TYPO3-english mailing list