👕
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
$283
★ 3.8
247 reviews
👕
Sony shirt 2
$244
★ 4.1
58 reviews
👕
LG shirt 3
$411
★ 4.1
320 reviews
👕
Dell shirt 4
$605
★ 4.6
400 reviews
👕
HP shirt 5
$899
★ 3.9
343 reviews
👕
Nike shirt 6
$377
★ 3.8
455 reviews
👕
Adidas shirt 7
$583
★ 4.3
478 reviews
👕
Apple shirt 8
$165
★ 3.8
13 reviews
👕
Samsung shirt 9
$661
★ 4.0
131 reviews
👕
Sony shirt 10
$378
★ 4.5
138 reviews
👕
LG shirt 11
$685
★ 4.1
30 reviews
👕
Dell shirt 12
$1026
★ 3.9
241 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>