First ViewHelper <f:first>
Note
This reference is part of the documentation of Fluid Standalone. If you are working with Fluid in TYPO3 CMS, please refer to TYPO3's ViewHelper reference instead.
The FirstViewHelper returns the first item of an array.
Example
<f:first value="{0: 'first', 1: 'second'}" />
Copied!
first
Copied!
Go to the source code of this ViewHelper: FirstViewHelper.php (GitHub).
Arguments
The following arguments are available for the first ViewHelper:
value
-
- Type
- array