[TYPO3-english] Re: [TYPO3] Output COA only if HMENU/TMENU is not empty

Stig Kjeldsen sk at itu.dk
Thu May 19 09:58:18 CEST 2011


Thanks for this useful tips.

Is it somehow possible to expand the TS, so (sub)pages has to be 
'doktype=1' and 'nav_hide=0' before the levelTitle will show?

Best regards

Stig Kjeldsen

Den 21-02-2006 11:32, Martin Rud skrev:
> Hi Peter
>
> Thanks for your tip! I helped me solving it by adding the TS marked with
> bold font:
>
> temp.submenuTitle = TEXT
> temp.submenuTitle {
> data = leveltitle :1
> wrap = <h1> | :</h1>
> * if {
> isTrue.numRows {
> table = pages
> }
> }*
> }
>
> :o)
>
> Peter Klein wrote:
>> 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 -------------->
>>
>>
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 267.15.12/265 - Release Date: 20-02-2006
>



More information about the TYPO3-english mailing list