Content Modeling
Collections & Entries
Collections let you manage repeatable, structured data — FAQs, team members, products, and more.
What is a Collection?
A collection is like a Section, but designed for repeatable data. You define the structure once (with elements using the same drag-and-drop Editor interface), then create many Entries that follow that structure.
| Concept | Section | Collection |
|---|---|---|
| Structure defined in | Editor | Editor |
| Content filled in | Builder (per page) | Manager (per entry) |
| Content instances | One per page placement | Many entries |
| Use case | Page layouts | Lists of data |
Common use cases: FAQs, team members, products, testimonials, portfolio items, job listings, event listings, partner logos.
Defining a Collection
Collections are created in the Editor using the same interface as sections — rows, slots, and elements.
No circular references
Collections cannot use the collection element type. This prevents circular references where a collection would contain another collection.
Entries
An entry is a single record in a collection. Each entry has:
| Property | Description |
|---|---|
| uuid | Unique identifier |
| name | Display name in the CMS |
| status | Published or unpublished |
| visibility | Hidden or shown |
| ordering | Position in the list (drag-and-drop) |
| elements | Per-locale content keyed by element keys |
Only published entries with "shown" visibility are returned by the public API.
Fetching via BreaseContext
For collections needed globally (e.g., in navigation or footer), configure them in BreaseContext:
// src/lib/brease-config.ts
export const contextData = {
navigations: [],
collections: [
{ key: 'faqs', id: 'col-a01c8223-4e4a-40aa-90d9-70149e87322c' },
{ key: 'testimonials', id: 'col-b02d9334-5f5b-51bb-a1ea-81250f98433d' },
],
}
Then access in client components:
'use client';
import { useBrease } from 'brease-next';
export default function Testimonials() {
const { collections } = useBrease();
const { testimonials } = collections;
if (!testimonials || testimonials.length === 0) return null;
return (
<div>
{testimonials.map(entry => (
<blockquote key={entry.uuid}>
<p>{entry.elements.quote as string}</p>
<cite>{entry.elements.author as string}</cite>
</blockquote>
))}
</div>
);
}
Type casting
Collection entry elements are untyped (Record<string, unknown>). Always cast them to the appropriate type based on your collection schema: entry.elements.title as string, entry.elements.image as BreaseMedia, etc.