👖
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
$927
★ 4.2
139 reviews
👖
Sony pant 2
$559
★ 4.4
180 reviews
👖
LG pant 3
$554
★ 4.1
157 reviews
👖
Dell pant 4
$487
★ 4.8
437 reviews
👖
HP pant 5
$1013
★ 3.6
63 reviews
👖
Nike pant 6
$729
★ 4.5
458 reviews
👖
Adidas pant 7
$871
★ 3.6
223 reviews
👖
Apple pant 8
$746
★ 3.8
456 reviews
👖
Samsung pant 9
$885
★ 4.2
490 reviews
👖
Sony pant 10
$896
★ 3.5
243 reviews
👖
LG pant 11
$614
★ 3.8
156 reviews
👖
Dell pant 12
$464
★ 4.6
144 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>