🗽

Events in New York

Page 4 of 5 • 6 events per page

Route: /events/new-york/4
4
Current Page
6
Events Shown
30
Total Events
EST
Timezone
Workshop #19

Health Workshop 19

1/4/2026 at 8:00 AM
New York Convention Center Hall B
208 attending
$65
Meetup #20

Education Meetup 20

1/5/2026 at 9:00 PM
New York Convention Center Hall C
74 attending
$70
Seminar #21

Tech Seminar 21

1/6/2026 at 10:00 AM
New York Convention Center Hall D
208 attending
Free
Concert #22

Art Concert 22

1/7/2026 at 11:00 PM
New York Convention Center Hall E
76 attending
$71
Festival #23

Music Festival 23

1/8/2026 at 12:00 AM
New York Convention Center Hall F
219 attending
$109
Conference #24

Food Conference 24

1/9/2026 at 1:00 PM
New York Convention Center Hall A
106 attending
Free

Pagination Route Details

File path: /pages/events/[city]/[page].astro
Static paths: Pre-generated for 5 cities × 5 pages = 25 routes
Current params: city="new-york", page="4"

Pagination Implementation

---
export function getStaticPaths() {
  const cities = ['san-francisco', 'new-york', 'london'];
  const maxPages = 5;

  return cities.flatMap(city => 
    Array.from({ length: maxPages }, (_, i) => ({
      params: { 
        city: city, 
        page: (i + 1).toString() 
      }
    }))
  );
}

const { city, page } = Astro.params;
const currentPage = parseInt(page || '1');
const events = getEventsForPage(city, currentPage);
---

<h1>Events in {city} - Page {currentPage}</h1>