[TYPO3] Output COA only if HMENU/TMENU is not empty

Peter Klein peter at umloud.dk
Tue Feb 21 10:31:24 CET 2006


Hi Martin. Try googling for "numrows"..

--
Peter Klein / Umloud Untd

"Martin Rud" <typo3 at explizit.dk> wrote in message 
news:mailman.1.1140507599.13071.typo3-english at lists.netfielders.de...
> Hi list,
>
> In the following TS I have a problem: I want the "temp.submenu" obejct 
> _only_ to be outputted if the "temp.menu_1"/"temp.submenu.20" object is 
> _not_ empty.
>
> How do I do that?
>
> And, if possible, how do I output another object (i.e. a COA object) _if_ 
> the "temp.menu_1"/"temp.submenu.20" object _is_ empty?
>
> Regards,
> Martin Rud
>
>
> <--------- TS snippet start -------------->
>
> # Create submenu with entry on second level
> temp.menu_1 = HMENU
> temp.menu_1 {
>   entryLevel = 1
> }
> temp.menu_1.1 = TMENU
> temp.menu_1.2 = TMENU
>
> temp.menu_1.1 {
>   NO.ATagTitle.field = title
>   NO.allWrap = <div class="menulevel1"> | </div>
>   ACT < NO
> }
> temp.menu_1.2 {
>   NO.ATagTitle.field = title
>   NO.allWrap = <div class="menulevel2"> | </div>
>   ACT < NO
> }
>
> # Create text-object with the title of the parent menu-item
> temp.submenuTitle = TEXT
> temp.submenuTitle {
>   data = leveltitle :1
>   wrap = <h1> | :</h1>
> }
>
> # Combine text-object and menu so the text-object becomes the header of 
> the menu
> temp.submenu = COA
> temp.submenu {
>   10 < temp.submenuTitle
>   20 < temp.menu_1
> }
>
> # Put this COA into the template
> temp.mainTemplate = TEMPLATE
> temp.mainTemplate {
>   template =< plugin.tx_automaketemplate_pi1
>   workOnSubpart = DOCUMENT_BODY
>   subparts {
>     rightbarContent < temp.rightbar
>     submenu < temp.submenu
> }
> <--------- TS snippet end --------------> 





More information about the TYPO3-english mailing list