[Typo3] Not render something if a menu is empty.

Ries van Twisk typo3 at rvt.dds.nl
Fri Feb 18 14:49:52 CET 2005


Peter Klein wrote:

>"Ries van Twisk" <typo3 at rvt.dds.nl> skrev i en meddelelse 
>news:mailman.49.1108678227.8905.typo3-english at lists.netfielders.de...
>  
>
>>Hey all, I have this TS code:
>>
>>leftmenu = COA
>>leftmenu.10 = TEXT
>>leftmenu.10.data = page : title
>>leftmenu.10.wrap= <div class="style1"> | </div>
>>leftmenu.20 = HMENU
>>leftmenu.20.special = keywords
>>leftmenu.20.special {
>>entryLevel = -1
>>setKeywords =
>>depth = 16
>>}
>>leftmenu.20.1 = TMENU
>>leftmenu.20.1 {
>>itemArrayProcFunc.menuListLimit = 5
>>itemArrayProcFunc = tx_ltgrating_pi1->user_sortPages
>>IProcFunc = tx_ltgrating_pi1->listPage
>>NO.allWrap =  <div class="style1 style4"> | </div>
>>}
>>
>>others < leftmenu
>>others.10.wrap= <div class="style1">| General Info1</div>
>>others.20.special.1.itemArrayProcFunc.menuListLimit = 5
>>
>>test = TEXT
>>test.value = RIES
>>
>>Can I do something like this?
>>
>>[globalString = others.20.stdWrap=]
>>others < test
>>}
>>[global]
>>
>>
>>What I want to do if others.20 (My HMENU) doesn't generate anything I want 
>>to override others with test.
>>
>>
>>how do I make such a condition?
>>
>>    
>>
>
>Hi Ries. You can't do it using CONDITIONS, but try inserting this line in 
>your HMENU object. (Make sure that the test object is defined BEFORE the 
>HMENU object.)
>
>leftmenu.20.stdWrap.ifEmpty.cObject  < test
>
>If the HMENU Object is empty, then the test object will be shown instead.
>
>  
>
Hey Peter,

I have seen your posts on the mailarchive about this subject to.
The thing is that I want to completely remove to 'others' because it 
still holds
    leftmenu.10 = TEXT
    leftmenu.10.data = page : title
    leftmenu.10.wrap= <div class="style1"> | </div>

Which I want to remove aswell..

This: leftmenu.20.stdWrap.ifEmpty.cObject  < test
works perfectly,
but I want to erease the complete thing... not just the HMENU


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