Attention
TYPO3 v12 has reached end-of-life as of April 30th 2026 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v12 here: TYPO3 ELTS.
Last ViewHelper <f:last>
The LastViewHelper returns the last item of an array.
Example
<f:last value="{0: 'first', 1: 'second'}" />
Copied!
second
Copied!
Go to the source code of this ViewHelper: LastViewHelper.php (GitHub).
Arguments
The following arguments are available for the last ViewHelper:
value
-
- Type
- array