👕
Shirts - Page 1
Showing page 1 of 5
Path: /marketplace/clothing/shirts/1
3
Path Depth
389
Total Items
1
Current Page
12
Items Shown
Nested Marketplace Route
File:
/marketplace/[...path].astro
Handles:
/marketplace/category/subcategory/page
Current path:
["clothing", "shirts", "1"]
Parsed as:
Category: "clothing", Subcategory: "shirts", Page: "1"
👕
Samsung shirt 1
$627
★ 4.5
19 reviews
👕
Sony shirt 2
$677
★ 4.5
363 reviews
👕
LG shirt 3
$618
★ 3.7
208 reviews
👕
Dell shirt 4
$461
★ 4.2
391 reviews
👕
HP shirt 5
$151
★ 4.7
141 reviews
👕
Nike shirt 6
$760
★ 4.9
376 reviews
👕
Adidas shirt 7
$363
★ 3.8
201 reviews
👕
Apple shirt 8
$784
★ 4.4
475 reviews
👕
Samsung shirt 9
$624
★ 5.0
188 reviews
👕
Sony shirt 10
$943
★ 4.2
279 reviews
👕
LG shirt 11
$391
★ 4.7
69 reviews
👕
Dell shirt 12
$464
★ 4.4
107 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>