👕
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
$989
★ 4.6
247 reviews
👕
Sony shirt 2
$640
★ 4.5
241 reviews
👕
LG shirt 3
$57
★ 5.0
327 reviews
👕
Dell shirt 4
$344
★ 4.1
33 reviews
👕
HP shirt 5
$984
★ 4.7
102 reviews
👕
Nike shirt 6
$902
★ 3.7
283 reviews
👕
Adidas shirt 7
$75
★ 4.7
290 reviews
👕
Apple shirt 8
$1049
★ 4.0
19 reviews
👕
Samsung shirt 9
$633
★ 3.6
280 reviews
👕
Sony shirt 10
$257
★ 3.9
362 reviews
👕
LG shirt 11
$373
★ 4.6
493 reviews
👕
Dell shirt 12
$342
★ 4.0
478 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>