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

Add offset parameter #99

Merged
merged 2 commits into from
Jan 28, 2025
Merged

Conversation

cpswsg
Copy link
Contributor

@cpswsg cpswsg commented Jan 25, 2025

Overview

This PR adds the offset parameter functionality, similar to how it works in the default Statamic collection tag. This allows users to skip a specified number of results in the output.

Changes

  • Added offset parameter handling in src/Events.php and src/Tags/Events.php
  • Updated documentation to include the new parameter

Example Usage

{{ events:upcoming collection="events" limit="10" offset="2" }}
  {{ start }} {{ end }} {{ has_end_time }}
  ...other entry data
{{ /events:upcoming }}

@edalzell
Copy link
Member

This is awesome, thanks!

I’ll get this merged next week.

@edalzell edalzell self-assigned this Jan 25, 2025
@edalzell edalzell self-requested a review January 28, 2025 21:40
@edalzell edalzell merged commit 7191a4b into transformstudios:main Jan 28, 2025
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants