Render.text ViewHelper <f:render.text>
ViewHelper to render content based on records and fields from a TCA schema. Handles the processing of both simple and rich text fields. By default, accessing a missing field raises an error. Set optional to true to return null instead.
Can also handle extbase models, you still need to provide the field name, not the property name.
<f:render.text record="{page}" field="bodytext" />
{record -> f:render.text(field: 'title')}
<f:render.text field="subheader">{record}</f:render.text>
{record -> f:render.text(field: 'subheader', optional: true)}
Copied!
Go to the source code of this ViewHelper: Render\TextViewHelper.php (GitHub).
Arguments
The following arguments are available for the render.text ViewHelper:
field
-
- Type
- string
- Required
- 1
The database field that should be rendered (even if extbase model is used).
optional
-
- Type
- boolean
- Default
- false
If the provided field does not exist in the record, null will be returned.
record
-
- Type
- object
A Record API Object or extbase model