.. include:: /Includes.rst.txt
.. _feature-84983:
==========================================================
Feature: #84983 - BE ViewHelper for EditDocumentController
==========================================================
See :issue:`84983`
Description
===========
Linking to FormEngine / EditDocumentController in fluid templates of backend modules
to edit database records and to create new records, has been simplified by introducing
a series of new view helpers.
Usage:
======
New record URI and Link view helper
-----------------------------------
Outputs the uri / the link to bring up FormEngine with the create new record form.
Available view helper arguments:
table
Mandatory. The database table the record belongs to.
uid
Optional. Negative value of the uid of the record the new record should be placed after. Must be negative!
pid
Optional. The pid of the page the record should be placed to. Must be zero or positive. If not given, defaults to zero (root page).
returnUrl
Optional. If given, the form redirects to that URL after save / close.
.. note::
The ViewHelper accepts either pid or uid to be set, not both. If none is set, the record will be put to pid 0,
if the TCA configuration of the table allows this.
.. code-block:: html
create news article
Edit record URI and Link view helper
------------------------------------
Outputs the uri / the link to bring up FormEngine with the records edit form.
Available view helper arguments:
table
Mandatory. The database table the record belongs to.
uid
Mandatory. The uid of the record to be edited.
returnUrl
Optional. If given, the form redirects to that URL after save / close.
.. code-block:: html
Impact
======
Extensions must no longer provide their own ViewHelpers for editing and creating records. The ones provided from ext:backend are public API.
.. index:: Backend, Fluid, ext:backend