Skip to main content

Booking Directory Block

A special directory block that displays booking types and claims child routes for individual booking detail pages.

Directory Block
Route-Claiming Block

This is a directory block - when placed on a page, it claims child routes. For example, if placed on a page with slug book:

  • /book - Shows the booking list (this block)
  • /book/muay-thai-class - Shows booking detail page
  • /book/muay-thai-class/checkout - Shows checkout page

Preview

Grid Layout with Categories

Booking types grouped by category

Book a Session

Browse our offerings and find the perfect class for you.

Group Classes

Train with others in our group class sessions

Fundamentals Class

Fundamentals Class

60 minutes

Build your foundation with basic techniques and proper form.

Advanced Sparring

Advanced Sparring

90 minutes

Take your skills to the next level with controlled sparring.

Private Sessions

One-on-one training with our expert coaches

Private Training

Private Training

60 minutes

One-on-one coaching customized to your goals.

Youth Programs

Classes designed for younger athletes

Kids Movement Class

Kids Movement Class

45 minutes

Fun classes for kids ages 6-12.

Flat Grid (No Categories)

All booking types in a simple grid

Our Classes

Fundamentals Class

Fundamentals Class

60 minutes

Build your foundation with basic techniques and proper form.

Advanced Sparring

Advanced Sparring

90 minutes

Take your skills to the next level with controlled sparring.

Private Training

Private Training

60 minutes

One-on-one coaching customized to your goals.

Kids Movement Class

Kids Movement Class

45 minutes

Fun classes for kids ages 6-12.

List Layout

Compact list view

Fundamentals Class

Fundamentals Class

60 minutes

Build your foundation with basic techniques and proper form.

View
Advanced Sparring

Advanced Sparring

90 minutes

Take your skills to the next level with controlled sparring.

View
Private Training

Private Training

60 minutes

One-on-one coaching customized to your goals.

View
Kids Movement Class

Kids Movement Class

45 minutes

Fun classes for kids ages 6-12.

View

Properties

PropertyTypeDefaultDescription
titlestring-Optional heading above the list
descriptionstring-Optional intro text
source'all' | 'selected''all'Show all booking types or selected ones
selectedTimeBlockIdsstring[]-IDs of specific booking types to show
layout'grid' | 'list''grid'Display layout
showCategoriesbooleantrueShow category filters
groupByCategorybooleantrueGroup items by category

Route Claiming

When this block is placed on a page, it claims child routes for the booking flow:

Page slug: "book"
├── /book → This block (listing)
├── /book/[bookingTypeSlug] → Booking detail page
└── /book/[bookingTypeSlug]/checkout → Checkout page

The page slug becomes the namespace for all booking routes.

Data Dependencies

This block pulls data from your space:

interface TimeBlock {
id: string
title: string
description: string
slug: string | null
coverImageSrc: string | null
shortDescription: string | null
lengthMinutes: number | null
categoryId: string | null
}

interface Category {
id: string
name: string
description: string | null
timeBlocks: TimeBlock[]
}

Usage

// Full directory with categories
<BookingDirectoryBlock
content={{
title: 'Book a Session',
description: 'Browse and book your next class',
source: 'all',
layout: 'grid',
showCategories: true,
groupByCategory: true,
}}
timeBlocks={bookingData}
categories={categoryData}
/>

Comparison: Booking vs Booking Directory

FeatureBooking BlockBooking Directory Block
Claims routesNoYes
Detail pagesNo (links to /book)Yes (/[pageSlug]/[itemSlug])
Category groupingNoYes
Use caseQuick listing/previewFull booking experience

Best Practices

  • Use for main booking page - This should be on your primary booking page
  • Choose a clear slug - "book", "services", or "classes" work well
  • Only one per site - A site should only have one booking directory
  • Enable categories - Helps users find what they're looking for