[TYPO3] Condition IF with OR in menu - or at least, if the menu has only one entry, it shouldn't be displayed.

Karol Martinka kmartinka at accalio.com.xxx
Sat Jan 19 11:29:29 CET 2008


Hi,

below is my code.. It is a menu, with special formated header, which shows the pages on the same level.
This works fine, however how can I hide the menu (the whole 5=COA), if the menu has only ONE item - the "CUR" item? Something like "menuitemcount" property? But also with a "OR" in the present IF statement.

Thanks in advance!! Karol

5 = COA
 5 {
   ### If the page is on the 'root level', then it won't show the menu (this is working)
   if {
    value.data = leveluid:-2
    equals = {$konstanty.mainpageID}
    negate = 1
   }
   ### Header text
   10 = TEXT
   10 {
    wrap = <h2>|</h2>
    data =  levelfield:-2,nav_title // levelfield:-2,title
    typolink.parameter.data = leveluid:-2
   }
   ### The menu itself
   20 = HMENU
   20.entryLevel=-2
   20.1 = TMENU
   20.1.wrap=<ul>|</ul>
   20.1.NO.allWrap = <li>|</li>
   20.1.CUR = 1
   20.1.CUR {
    allWrap = <li class="hlite">|</li class="hlite">
    doNotLinkIt = 1
   }
  }  
}


 
 


More information about the TYPO3-english mailing list