Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] ViewHelpers to return first/last item of an array #866

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

s2b
Copy link
Contributor

@s2b s2b commented Apr 4, 2024

The FirstViewHelper and LastViewHelper return the first or last item of a specified array, respectively.

Examples

<f:first value="{0: 'first', 1: 'second', 2: 'third'}" /> <!-- Outputs "first" -->
<f:last value="{0: 'first', 1: 'second', 2: 'third'}" /> <!-- Outputs "third" -->

s2b added 2 commits April 4, 2024 11:12
The FirstViewHelper and LastViewHelper return the first or last
item of a specified array, respectively.

## Examples

```xml
<f:first value="{0: 'first', 1: 'second', 2: 'third'}" /> <!-- Outputs "first" -->
<f:last value="{0: 'first', 1: 'second', 2: 'third'}" /> <!-- Outputs "third" -->
```
@s2b s2b merged commit 392c7d5 into main Apr 5, 2024
6 checks passed
@s2b s2b deleted the feature/FirstLastViewHelper branch April 5, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants