[TYPO3] ifEmpty, required and so on

Victor Livakovsky v-tyok at mail.ru
Thu Oct 2 23:37:25 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
>     }
>   }
> }


Thnk you very much! :) Your advise was helpful!
Finally it works, as it should work.
I only added
pidInList.data = field:uid
to "select" in your code.



More information about the TYPO3-english mailing list