[TYPO3] How does ifEmpty work? Simple TypoScript question

Benjamin Mack bmack at kirix.com
Wed Jul 5 09:17:34 CEST 2006


Hey Joey,

that's what I figured too then.

Thanks a lot!

greetings,
benni.
-SDG-


JoH wrote:
>> I just wondered about the "if" Functions. I am able to make nothing of
>> it. The documentation (in regard of the posts about that the last
>> days) does not help me really about that.
>>
>> What I want is, that if my MENU object is empty, that it overrides the
>> sidemenu.wrap function. That's why I got this "wrap" on line 3, and it
>> should be overridden in the last line. Could someone please help me
>> on this? ----
>> lib.sidemenu = HMENU
>> lib.sidemenu.entryLevel = 2
>> lib.sidemenu.wrap = <div id="sidenav"> | </div>
>> lib.sidemenu.1 = TMENU
>> lib.sidemenu.1 {
>>   noBlur = 1
>>   NO = 1
>>   ACT = 1
>> }
>> lib.sidemenu.stdWrap.ifEmpty.wrap = |
> 
> Not necessary here ot use ifEmpty.
> Simply move the wrap to TMENU instead of HMENU.
> 
> lib.sidemenu = HMENU
> lib.sidemenu {
>     entryLevel = 2
>     1 = TMENU
>     1 {
>         wrap = <div id="sidenav"> | </div>
>         noBlur = 1
>         NO = 1
>         ACT = 1
>     }
> }
> 
> TMENU wrap will wrap only, if there are items in the menu.
> 
> Joey
> 



More information about the TYPO3-english mailing list