TSref/COA

From TYPO3Wiki

Jump to: navigation, search
TSref/COA
Translations info
An english page for every translation.
All pagenames in english.

  en       de   nl   fr   ja   zh  

TypoScript This page is document in progress.

COA - COBJ_ARRAY

http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/8/4/

This cObject has the alias COA. You can use this instead of COBJ_ARRAY.

You can also create this object as a COA_INT in which case it works exactly like the PHP_SCRIPT_INT object does: It's rendered non-cached! The COA_INT provides a way to utilize this feature not only with PHP_SCRIPT cObjects but any cObject.


Property: Data type: Description: Default:
1,2,3,4... cObject
if if if "if" returns false the COA is NOT rendered
wrap wrap
stdWrap stdWrap
includeLibs list of resource (This property is used only if the object is COA_INT!, See introduction.)

This is a comma-separated list of resources that are included as PHP-scripts (with include_once() function) if this script is included.

This is possible to do because any include-files will be known before the scripts are included. That's not the case with the regular PHP_SCRIPT cObject.

[tsref:(cObject).COA/(cObject).COA_INT/(cObject).COBJ_ARRAY]

Examples

temp.menutable = COBJ_ARRAY
temp.menutable {
 10 = HTML
 10.value = <table border=0 cellpadding=0 cellspacing=0>
 
 20 = HMENU
 20.entryLevel = 0
 20.1 = GMENU
 20.1.NO {
   wrap = <tr><td> | </td></tr>
   XY = {$menuXY}
   backColor = {$bgCol}
   20  = TEXT
   20 {
     text.field = title
     fontFile = media/fonts/hatten.ttf
     fontSize = 23
     fontColor = {$menuCol}
     offset = |*| 5,18 || 25,18
   }
 }
 30 = HTML
 30.value = </table>
}



# this will not be cached
lib.currentDate = COA_INT
lib.currentDate {
   10 = TEXT
   10.data = date:U
   10.strftime = %A, %e. %B %Y
}
# in this special case, you could clear the
# cache at midnight, so you could use
# lib.currentDate = COA
# and that object will be cached
page {
    config {
        cache_clearAtMidnight = 1
    }
}
Personal tools