Link.editRecord ViewHelper <be:link.editRecord>
New in version 14.0
Argument module has been added to explicitly define the backend module context used when opening the FormEngine to edit or create a record.
Note
This ViewHelper is not available by default.
Import its namespace
{namespace be=TYPO3\ in the Fluid file or
xmlns: in the opening HTML tag.
Use this ViewHelper to provide edit links to records. The ViewHelper will pass the uid and table to FormEngine.
The uid must be given as a positive integer. For new records, use the <be:link.newRecordViewHelper>.
Go to the source code of this ViewHelper: Link\EditRecordViewHelper.php (GitHub).
Edit a record in the contextual editing sheet
New in version 14.3 Important: #110307 - New editRecord ViewHelper argument for contextual editing
The contextual argument has been added.
With contextual="true", the ViewHelper opens the record in the same
contextual editing sheet that the Layout module uses, instead
of loading the full editing form in the content frame:
<be:link.editRecord
uid="{record.uid}"
table="pages"
fields="title,subtitle"
contextual="true"
class="btn btn-default"
>
Edit page properties
</be:link.editRecord>
The ViewHelper then renders a
<typo3- element instead of a link,
and loads the JavaScript module of this element. A backend user can switch
off the option Use quick editing for records in the Layout module
in their user settings. The element then opens the full editing form in the
content frame, like the link without contextual.
Arguments of the <be:link.editRecord> ViewHelper
Allows arbitrary arguments
This ViewHelper allows you to pass arbitrary arguments not defined below
directly to the HTML tag created. This includes custom data- arguments.
additionalAttributes
-
- Type
- array
Additional tag attributes. They will be added directly to the resulting HTML tag.
aria
-
- Type
- array
Additional aria-* attributes. They will each be added with a "aria-" prefix.
contextual
-
- Type
- bool
- Default
- false
Render a contextual edit trigger instead of a classic edit link
data
-
- Type
- array
Additional data-* attributes. They will each be added with a "data-" prefix.
fields
-
- Type
- string
Edit only these fields (comma separated list)
module
-
- Type
- string
- Default
- ''
Set module identifier for context - marking as active when editing the record
returnUrl
-
- Type
- string
- Default
- ''
return to this URL after closing the edit dialog
table
-
- Type
- string
- Required
- 1
target database table
uid
-
- Type
- int
- Required
- 1
uid of record to be edited