TSref/CONTENT
From TYPO3Wiki
| TypoScript Reference - CONTENT |
|
||||
This page is document in progress. TypoScript
CONTENT
Generating content.
The register-key SYS_LASTCHANGED is updated with the tstamp-field of the records selected which has a higher value than the current.
| Property: | Data type: | Description: | Default:
|
| select | ->select | The SQL-statement is set here! | |
| table | tableName | The table, the content should come from.
In standard-configurations this will be "tt_content" NOTE: Only tables allowed are “pages” or tables prefixed with one of these: “tt_”, “tx_”, “ttx_”, “fe_”, “user_”
| |
| renderObj | cObject | < [tablename] | |
| slide | integer | If set and no content element is found by the select command, then 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): If set, all content elements found on 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): 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): Change order of elements in collect mode. If set, elements of the current page will be on the bottom.
| |
| wrap | wrap | Wrap the whole content-story... | |
| stdWrap | stdWrap |
[tsref:(cObject).CONTENT]
Example (of the CONTENT-obj):
1 = CONTENT
1.table = tt_content
1.select {
pidInList = this
orderBy = sorting
}
Example (of record-renderObj's):
// Configuration for records with the typeField-value (often "CType") set to "header"
tt_content.header.default {
10 = TEXT
10.field = header
.....
}
// Configuration for records with the typeField-value (often "CType") set to "bullets"
// If field "layout" is set to "1" or "2" a special configuration is use, else default
tt_content.bullets.subTypeField = layout
tt_content.bullets.default {
.....
}
tt_content.bullets.1 {
.....
}
tt_content.bullets.2 {
.....
}
// This is what happens if the typeField-value does not match any of the above
tt_content.default.default {
.....
}
# If you want to load Data from your Table and look up
# for an special entry which is given as an GET/POST Parameter
# you could load it into an Register.
1 = LOAD_REGISTER
1.param.cObject = TEXT
1.param.cObject.data = GPvar:the_id
# To avoid SQL-Injections you have to set intval - so the param
# will always an integer.
1.param.cObject.intval = 1
10 = CONTENT
10.table = tx_my_table
10.select {
pidInList = this
orderBy = sorting
# Now you can use the registered param
andWhere = uid = {REGISTER:param}
andWhere.insertData = 1
}
10.renderObj = COA
10.renderObj {
10 = TEXT
10.field = the_id
}
