🗽

Events in New York

Page 2 of 5 • 6 events per page

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

Tech Workshop 7

2/10/2026 at 8:00 AM
New York Convention Center Hall B
189 attending
$72
Meetup #8

Art Meetup 8

2/11/2026 at 9:00 PM
New York Convention Center Hall C
212 attending
$77
Seminar #9

Music Seminar 9

2/12/2026 at 10:00 AM
New York Convention Center Hall D
91 attending
Free
Concert #10

Food Concert 10

2/13/2026 at 11:00 PM
New York Convention Center Hall E
63 attending
$29
Festival #11

Business Festival 11

2/14/2026 at 12:00 AM
New York Convention Center Hall F
104 attending
$56
Conference #12

Health Conference 12

2/15/2026 at 1:00 PM
New York Convention Center Hall A
226 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="2"

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>