.. include:: /Includes.rst.txt
.. _viewhelpers:
====================
ViewHelper Reference
====================
.. tip::
The Frontend Editing extension automatically includes its ViewHelpers in the
`core` namespace, so you don't have to declare the namespace.
.. _viewhelpers-contenteditable:
contentEditable
===============
Defines editable regions within Fluid templates.
Arguments
---------
table
~~~~~
:aspect:`DataType`
string
:aspect:`Required`
true
:aspect:`Description`
The database table name to where the data should be saved.
field
~~~~~
:aspect:`DataType`
string
:aspect:`Required`
false
:aspect:`Description`
The database field to where the data should be saved.
uid
~~~
:aspect:`DataType`
string
:aspect:`Required`
true
:aspect:`Description`
The database field to where the data should be saved
tag
~~~
:aspect:`DataType`
string
:aspect:`Required`
false
:aspect:`Description`
The HTML tag to use for the editable wrapper.
additionalAttributes
~~~~~~~~~~~~~~~~~~~~
:aspect:`DataType`
mixed
:aspect:`Required`
false
:aspect:`Description`
Additional tag attributes. They will be added directly to the resulting HTML tag.
data
~~~~
:aspect:`DataType`
mixed
:aspect:`Required`
false
:aspect:`Description`
Additional data-* attributes. They will each be added with a "data-" prefix.
Basic example
-------------
This makes the field `bodytext` of the table `tt_content` editable:
.. code-block:: html
You're using Frontend Editing. Congratulations!
You're using Frontend Editing. Congratulations!
.. _viewhelpers-isplaceholderenabled: isPlaceholderEnabled ==================== Use this view helper in conditions to show empty fields when the :ref:`placeholder feature