DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Slot

Defines a slot which can be rendered in the field layout with the ViewHelper “Slot.Render”.

The goal of this ViewHelper is to dynamize some parts of the layout, for instance to be able to display informative messages for some fields.

Important

This ViewHelper must be used inside a ViewHelper “Field”.

Arguments

Argument Description
* name

Name of the slot.

Note that if you use the name of a slot which is not used in the field layout, this slot wont be rendered.

arguments Array of arbitrary arguments that will be passed to the slot and can be used within it as Fluid variables.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{namespace fz=Romm\Formz\ViewHelpers}

<fz:form action="submitForm" name="myForm">

    <fz:field name="email" layout="default">

        <!-- This slot appears just before the list of validation messages. -->

        <fz:slot name="Messages.Out.Before" arguments="{myClass: 'info'}">
            <div class="{myClass}">Hello world!</div>
        </fz:slot>

    </fz:field>

</fz:form>