CObject ViewHelper <f:cObject>

ViewHelper to render CObjects (objects containing rendering definitions for records/elements), using the global TypoScript configuration.

  <f:cObject typoscriptObjectPath="lib.someLibObject" />
Copied!

Note: You have to ensure proper escaping (htmlspecialchars/intval/etc.) on your own!

Go to the source code of this ViewHelper: CObjectViewHelper.php (GitHub).

Arguments

The following arguments are available for the cObject ViewHelper:

currentValueKey

currentValueKey
Type
string
currentValueKey

data

data
Type
mixed
the data to be used for rendering the cObject. Can be an object, array or string. If this argument is not set, child nodes will be used

table

table
Type
string
Default
''
the table name associated with "data" argument. Typically tt_content or one of your custom tables. This argument should be set if rendering a FILES cObject where file references are used, or if the data argument is a database record.

typoscriptObjectPath

typoscriptObjectPath
Type
string
Required
1
the TypoScript setup path of the TypoScript object to render