[TYPO3] If submenu is empty different COA

tapio tapio.markula at dnainternet.net
Fri Mar 3 08:43:41 CET 2006


> Sorry - but the whole approach is way too complicated.
> Simply do the following:
> 
> temp.menu_2 = HMENU
> temp.menu_2 {
>     entryLevel=2
>     1 = TMENU
>     1 {
>         wrap = <td class="menuCell">|</td>
>         NO = 1
>         NO {
>             blah
>         }
>     }
> }
> 
> temp.menu_3 = COA
> temp.menu_3 {
>     10 = COA
>     10 {
>         wrap = <td>|</td>
>         10 < styles.content.get
>     }
>     20 < temp.menu_2
> }
> 
> No "if", no "ifEmpty", no "ifNotEmpty", just a simple copy of a HMENU
> element with a wrap that will be empty (and not wrapped) or not empty (and
> wrapped).
> Simple as that.

> Joey

You are right. I tested

temp.menu_2 = HMENU
temp.menu_2.entryLevel=2
temp.menu_2.1 = TMENU
temp.menu_2.1 {
wrap=<td class="menuCell”><table cellpadding="0" cellspacing="0" 
style="margin:0; height:100%; width:168px; 
background-color:#F7F7F4"><tr><td valign="top" class="menu_2_header" 
width="168" height="25"></td></tr><tr><td height="10"></td></tr><tr><td 
valign="top">|</td></tr></table></td>
   NO = 1

   NO.allWrap = <div class="menu2-level3-no"> | </div>
   NO.linkWrap = <span>|</span>
   NO.ATagBeforeWrap = 1

   ACT  < .NO

   ACT.allWrap = <div class="menu2-level3-act"> | </div>
   ACT.linkWrap = <span class="act">|</span>

   ACTIFSUB < .ACT

   CUR < .ACT

   CUR.linkWrap = <span class="cur">|</span>
   CUR.doNotLinkIt=1

   CURIFSUB < .CUR
}


temp.getNormal = COA
temp.getNormal{
     10 = COA
     10 {
         wrap = <td class=”colNormalTD”>|</td>
         10 < styles.content.get
     }
     20 < temp.menu_2
}

And it worked. Thank's.

But I must still learn to use proprly
conditions ifEmpty, if etc. in my TS-templates.
> 



More information about the TYPO3-english mailing list