Attention
TYPO3 v6 has reached its end-of-life April 18th, 2017 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
There is no further ELTS support. It is strongly recommended updating your project.
CONTENT¶
This object is designed to generate content by making it possible to finely select records and rendering them.
The register-key SYS_LASTCHANGED is updated with the tstamp-field of the records selected which has a higher value than the current.
The cObject RECORDS in contrast is for displaying lists of records from a variety of tables without fine graining.
Property
table
Data type
table name /stdWrap
Description
The table, the content should come from.
In standard configuration this will be "tt_content".
Note: Until TYPO3 6.1 allowed tables were "pages" or tables with one of these prefixes: "pages_", "tt_", "tx_", "ttx_", "fe_", "user_" or "static_". Since TYPO3 6.2 prefixes are no longer checked; now any table can be used.
Property
renderObj
Data type
Description
The cObject used for rendering the records resulting from the query in .select.
If .renderObj is not set explicitly, then < [table name] is used. So in this case the configuration of the according table is being copied. See the notes on the example below.
Default
< [table name]
Property
slide
Data type
integer /stdWrap
Description
If set and no content element is found by the select command, the rootLine will be traversed back until some content is found.
Possible values are "-1" (slide back up to the siteroot), "1" (only the current level) and "2" (up from one level back).
Use -1 in combination with collect.
.collect: (integer /stdWrap) If set, all content elements found on the current and parent pages will be collected. Otherwise, the sliding would stop after the first hit. Set this value to the amount of levels to collect on, or use "-1" to collect up to the siteroot.
.collectFuzzy: (boolean /stdWrap) Only useful in collect mode. If no content elements have been found for the specified depth in collect mode, traverse further until at least one match has occurred.
.collectReverse: (boolean /stdWrap) Reverse order of elements in collect mode. If set, elements of the current page will be at the bottom.
Note: The sliding will stop when reaching a folder. See $cObj->checkPid_badDoktypeList.
[tsref:(cObject).CONTENT]
Example:¶
Here is an example of the CONTENT object:
1 = CONTENT
1.table = tt_content
1.select {
pidInList = this
orderBy = sorting
}
Since in the above example .renderObj is not set explicitly, TYPO3 will automatically set 1.renderObj < tt_content, so that renderObj will reference the TypoScript configuration of tt_content. The according TypoScript configuration will be copied to renderObj.
Example:¶
Here is an example of record-rendering objects:
// Configuration for records with the "field" type value
// (often "CType") set to "header"
tt_content.header.default {
10 = TEXT
10.stdWrap.field = header
.....
}
// Configuration for records with the "field" type value
// (often "CType") set to "bullets"
// If field "layout" is set to "1" or "2", a special configuration is used,
// else defaults are being used.
tt_content.bullets.subTypeField = layout
tt_content.bullets.default {
.....
}
tt_content.bullets.1 {
.....
}
tt_content.bullets.2 {
.....
}
// This is what happens if the "field" type value does not match any of the above
tt_content.default.default {
.....
}