[TYPO3] ifEmpty, required and so on

JoH asenau info at cybercraft.de
Thu Oct 2 22:17:32 CEST 2008


> I have such menu:
>
> temp.submenu = COA
> temp.submenu.wrap = <div class="sub">|</div>
> temp.submenu.10 = TEXT
> temp.submenu.10.value = <div class="subheader">{$Name} -
> {field:title}</div> temp.submenu.10.insertData = 1
> temp.submenu.20 = HMENU
> temp.submenu.20.wrap = <div class="submenu">|</div>
> temp.submenu.20.entryLevel = 1
> temp.submenu.20.1 = TMENU
> temp.submenu.20.1 {
>   NO.wrapItemAndSub = <p>|</p>
> }
>
> And I want it be visible only on that pages, which has subpages. I was
> trying to play around "ifEmpty", "if" and "required", but cann't
> understand: how can I disable whole COA (temp.submenu) object, when
> temp.submenu.20 is empty?

temp.submenu = COA
temp.submenu {
  wrap = <div class="sub">|</div>
  10 = blah
  ...
  20 = blah
  ...
  if.isTrue.numRows {
    table = pages
    select {
        # some additional code for where clause here
        # to determine the pages you want to see
        # have a look at TSref to get a clue
    }
  }
}

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
T3 cookbook: http://www.typo3experts.com
Jobs: http://www.professionals-only.com




More information about the TYPO3-english mailing list