👖
Pants - Page 1
Showing page 1 of 5
Path: /marketplace/clothing/pants/1
3
Path Depth
267
Total Items
1
Current Page
12
Items Shown
Nested Marketplace Route
File:
/marketplace/[...path].astro
Handles:
/marketplace/category/subcategory/page
Current path:
["clothing", "pants", "1"]
Parsed as:
Category: "clothing", Subcategory: "pants", Page: "1"
👖
Samsung pant 1
$636
★ 4.1
407 reviews
👖
Sony pant 2
$429
★ 3.9
131 reviews
👖
LG pant 3
$293
★ 4.0
45 reviews
👖
Dell pant 4
$713
★ 4.6
463 reviews
👖
HP pant 5
$602
★ 4.2
129 reviews
👖
Nike pant 6
$232
★ 3.9
174 reviews
👖
Adidas pant 7
$534
★ 4.2
49 reviews
👖
Apple pant 8
$225
★ 3.7
92 reviews
👖
Samsung pant 9
$709
★ 4.8
270 reviews
👖
Sony pant 10
$670
★ 3.7
203 reviews
👖
LG pant 11
$288
★ 4.9
322 reviews
👖
Dell pant 12
$348
★ 4.8
245 reviews
Try These Marketplace Paths
/marketplace/electronics → Electronics category /marketplace/electronics/phones → Phone subcategory /marketplace/electronics/phones/2 → Page 2 of phones /marketplace/clothing/shoes/1 → Page 1 of shoes Nested Marketplace Implementation
---
// File: /marketplace/[...path].astro
export function getStaticPaths() {
// Pre-generate all possible marketplace paths
return [
{ params: { path: 'electronics' } },
{ params: { path: 'electronics/phones' } },
{ params: { path: 'electronics/phones/1' } },
{ params: { path: 'electronics/phones/2' } },
// ... more paths
];
}
const { path } = Astro.params;
const [category, subcategory, page] = path.split('/');
---
<h1>{category} → {subcategory} → Page {page}</h1>