[Typo3] Not render something if a menu is empty.
Ries van Twisk
typo3 at rvt.dds.nl
Tue Feb 22 16:03:49 CET 2005
Peter Klein wrote:
>"Ries van Twisk" <typo3 at rvt.dds.nl> skrev i en meddelelse
>news:mailman.293.1109081351.24686.typo3-english at lists.netfielders.de...
>
>
>>Peter Klein wrote:
>>
>>
>>
>>>Hi Ries
>>>You can test if a menu object is empty with ".if.isTrue < YourMenuObject"
>>>Like in this example:
>>>-- cut --
>>>temp.tstmenu = HMENU
>>>temp.tstmenu {
>>> entryLevel = 1
>>> # Do NOT put "wrap" here!!
>>> 1 = TMENU
>>> 1 {
>>> wrap = <div style="border:1px solid black">Testmenu<br>|</div>
>>> NO {
>>> AllWrap = |<br>
>>> }
>>> }
>>>}
>>>
>>>temp.menu = TEXT
>>>temp.menu.value = <br>Menu is EMPTY!!<br>
>>>temp.menu.if.isTrue < temp.tstmenu
>>>
>>>page.10 < temp.menu
>>>
>>>-- cut --
>>>
>>>
>>>
>>thank yo for the information.
>>The problem is however that I want do remove something else instead of the
>>menu itself
>>so the TS code 'temp.menu.if.isTrue < temp.tstmenu' does not work for me.
>>
>>
>
>Hi Ries. That's more or less what my TS example does..
>
>The "temp.tstmenu" is the menuobject.
>"temp.menu" is an entirely diffrent object. (Maybe I shouldn't have named it
>temp.menu)
>
>If the menuobject "temp.tstmenu" is empty, then the "temp.menu" object will
>be rendered.
>To reverse it, so that "temp.menu" is rendered when "temp.tstmenu" is NOT
>empty, you just add a "if.negate = 1"
>
>Like this:
>
>temp.menu = TEXT
>temp.menu.value = <br>Menu is NOT EMPTY!!<br>
>temp.menu.if.isTrue < temp.tstmenu
>temp.menu.if.negate = 1
>
>
>
Ahhh...ok
I will test this when I have some time and let you know the result..
cheers,
Ries
--
R. van Twisk
http://www.metamorf.net
Our Typo3 enabled website: http://www.livetravelguides.com
Instand help for Typo3? irc:/irc.freenode.net/typo3
Looking for documentation? http://typo3.org/documentation/
More information about the TYPO3-english
mailing list