[TYPO3] Unique ids for menu items based on menu postion

Ron Hall ron at busynoggin.com
Sun Dec 23 17:14:09 CET 2007


Thank you. That is what I needed.

I actually ended up using it to add a parameter to the <a> tag. The  
TypoScript looks like this:

menu.1.NO.ATagParams.dataWrap =  
id="sub_{register:count_HMENU_MENUOBJ}_trigger"

and produces a link that looks like this:

<a href="my-approach/"  id="sub_3_trigger">


Ron


On Dec 23, 2007, at 9:14 AM, Krystian Szymukowicz wrote:

> Ron Hall wrote:
>> I am trying to find out if the is a way to generate unique css id"s  
>> for
>> menu items based on menu position.
>>
>> I know it is possible to do this using the unique id of the page. For
>> instance for a menu of pages with uid's pf 132 445, and 12, I know  
>> I can
>> generate HTML like this:
>>
>> <li id="menu-item-132">Menu Item 1 ...
>> <li id="menu-item-445">Menu Item 2 ...
>> <li id="menu-item-12">Menu Item 3 ...
>>
>> By using typoscipt like:
>>
>> menu.1.NO.wrap = <li id="topMenuItem{elementUid}"> | </li>li>
>>
>> However is there code for generating HTML like this?
>>
>> <li id="menu-item-1">Menu Item 1 ...
>> <li id="menu-item-2">Menu Item 2 ...
>> <li id="menu-item-3">Menu Item 3 ...
>>
>
> hi
>
> Look for "count_menuItems", "count_HMENU_MENUOBJ" in google.
> You should get some examples.
>
> --
> grtz
> Krystian
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list