diff --git a/Documentation/ApiOverview/Fluid/Introduction.rst b/Documentation/ApiOverview/Fluid/Introduction.rst index c95658a18c..a814498119 100644 --- a/Documentation/ApiOverview/Fluid/Introduction.rst +++ b/Documentation/ApiOverview/Fluid/Introduction.rst @@ -144,9 +144,35 @@ Templates can be used with or without a Layout. *optional* -Partials are a Fluid component. Partials can be used as reusable components from within -a template. +Some parts within different templates might be the same. To not repeat this part +in multiple templates, Fluid offers so-called partials. Partials are small pieces +of Fluid template within a separate file that can be included in multiple templates. +Partials are stored, by convention, within :file:`Resources/Private/Partials/`. + +Example partial: + +.. code-block:: html + :caption: EXT:my_extension/Resources/Private/Partials/Tags.html + + Tags: + + +Example template using the partial: + +.. code-block:: html + :caption: EXT:my_extension/Resources/Private/Templates/Show.html + + + +The variable :html:`post.tags` is passed to the partial as variable :html:`tags`. + +If ViewHelpers from a different namespace are used in the partial, the namespace +import can be done in the template or the partial. Example: Using Fluid to create a theme ======================================