[TYPO3] wrap menu-item based on condition

Peter Klein peter at umloud.dk
Thu May 18 16:24:29 CEST 2006


Hi David. You can't use Conditions inside {} brackets.
And you won't be able to use conditions to set the classes either, as 
conditions doesn't work on menuitems.

Usually you can use the "if" property, along with it's property "inList", 
but that won't work in you case either, because you can't use the "if" 
property on "wrapItemAndSub", as "wrapItemAndSub" doesn't have stdWrap.
The easiest solution would be to write a small IProcFunc, that adds a class 
if the page is one of those 3 IDs.

-- 
Peter Klein/Umloud Untd


"Vandemaele David" <david.vandemaele at telenet.be> skrev i en meddelelse 
news:mailman.1.1147951688.31636.typo3-english at lists.netfielders.de...
> Hello,
>
> certain menu-items need a different css class.
> What should come in place of ####ID####? I've tried several words, but 
> none of them is working.
>
> Perhaps my tscript contains some other error?
>
>
> lib.menu_1{
>  1 = TMENU
>         1.expAll = 1
>         [####ID####=44,39,40]
>         1.NO.wrapItemAndSub = <li class="BL">|</li>
>         [ELSE]
>          1.NO.wrapItemAndSub = <li>|</li>
>         [END]
>
>         2 = TMENU
>  2.wrap = <ul>|</ul>
>  2.NO.wrapItemAndSub = <li>|</li>
>         2.expAll = 1
>  3 = TMENU
>  3.wrap = <ul>|</ul>
>  3.NO.wrapItemAndSub = <li>|</li> 3.expAll = 1
> }
>
> David 





More information about the TYPO3-english mailing list