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

Peter Klein peter at umloud.dk
Fri Feb 18 10:31:19 CET 2005


"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.

-- 
Peter Klein/Umloud Untd





More information about the TYPO3-english mailing list