diff --git a/Documentation/ApiOverview/Fluid/Syntax.rst b/Documentation/ApiOverview/Fluid/Syntax.rst index 836952f318..08b557ef5a 100644 --- a/Documentation/ApiOverview/Fluid/Syntax.rst +++ b/Documentation/ApiOverview/Fluid/Syntax.rst @@ -71,14 +71,56 @@ It is possible to access array or object values by a dynamic index: myArray.{myIndex} -ViewHelper attributes -===================== +ViewHelpers +=========== + +ViewHelpers are special tags in the template which provide more complex +functionality such as loops or generating links. + +The functionality of the ViewHelper is implemented in PHP, every ViewHelper has +its own PHP class. + +Within Fluid, the ViewHelper is used as a special HTML element with a namespace +prefix, for example the namespace prefix "f" is used for ViewHelpers from the +Fluid namespace: + +.. code-block:: html + :caption: Fluid example with for ViewHelper + + + +
  • {result.title}
  • +
    + + +The "f" namespace is already defined, but can be explicitly specified to +improve IDE autocompletion. + +If the attribute :html:`data-namespace-typo3-fluid="true"` is specified on the +:html:`html` element, the HTML element itself won’t be rendered +This is useful for various IDEs and HTML auto-completion. + +.. code-block:: html + :caption: Fluid example with custom ViewHelper "custom" in namespace "my" + + + + See the :doc:`Fluid Viewhelper Reference ` for a complete list of all available ViewHelpers. +Viewhelper attributes +--------------------- + Simple ------- +~~~~~~ Variables can be inserted into ViewHelper attributes by putting them in curly braces: