[TYPO3] Giving the first and last items in a menu an extra class
Florian Schupp | FORMER 03 GmbH
florian.schupp at former03.de
Wed Dec 19 12:04:59 CET 2007
1. Be aware that you will have a LI item with class="last" if you have
only one item in your Menu! This can cause CSS trouble ;-)
2. After each classname there is one " missing.
cheers Flo
Stephen Bungert wrote:
> That fixed it thanks. Had trouble understanding the tsref examples!
>
> -----Ursprüngliche Nachricht-----
> Von: typo3-english-bounces at lists.netfielders.de
> [mailto:typo3-english-bounces at lists.netfielders.de] Im Auftrag von Bas van
> der Togt
> Gesendet: Dienstag, 18. Dezember 2007 17:53
> An: typo3-english at lists.netfielders.de
> Betreff: Re: [TYPO3] Giving the first and last items in a menu an extra
> class
>
> Stephen,
>
> What is your problem with optionsplit?
> This should work for you:
>
> NO.allWrap = <li class="thirst>|</li> |*| <li class="middle>|</li> |*|
> <li class="last>|</li>
>
> kind regards,
> Bas
>
> Stephen Bungert wrote:
>
>>A piece of my current code:
>>
>>lib.mainNav.1 {
>>
>> # Normal state properties
>> NO.stdWrap.htmlSpecialChars = 1
>>
>> # Allow adding the Uid to wrap HTML
>> NO.subst_elementUid = 1
>> NO.ATagBeforeWrap = 1
>> NO.allWrap = <li class="menuMain-no" id="mainMenuLi{elementUid}"> |
>
> </li>
>
>> NO.ATagParams = id="mainMenuLiA{elementUid}"
>>
>>
>> # Enable active state and set properties:
>> ACT = 1
>> ACT.stdWrap.htmlSpecialChars = 1
>> ACT.allWrap = <li class="menuMain-act" id="mainMenuLi{elementUid}"> |
>></li>
>>
>> # Remove link form active menu items
>> CUR = 1
>> CUR.stdWrap.htmlSpecialChars = 1
>> CUR.doNotLinkIt = 1
>> CUR.allWrap = <li class="menuMain-cur" id="mainMenuLi{elementUid}"> |
>
> </li
>
>>}
>>
>>Is it possible tot o make the first item and last item in a menu have a
>>different class? I need the first item to have the class 'first' and the
>>last item 'last'.
>>
>>Hi do this with typoscript? Conditions based on id number? I'd rather have
>>something that works automatically incase pages are added later. I thought
>>maybe using optionSplit, there's even an example in tsrf for menus, but
>
> this
>
>>is only for submenus. How can you do this on a top level menu?
>>
>
> _______________________________________________
> 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