thincms_create_collection
Create a collection to group and display items in card, carousel, banner, list, or compact layouts.
Instructions
Create a new collection. Display modes: 'cards' (grid), 'carousel' (horizontal scroll), 'banner' (full-width rotating), 'list' (vertical stack), 'compact' (smaller grid). Embed with {{collection:slug}} in page frame or content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Collection name | |
| slug | No | URL-safe slug (auto-generated from name if omitted) | |
| siteId | No | Override the active site for this single call. Pass to target a specific tenant without mutating shared active-site state — the right pattern when running concurrent agent sessions managing different tenants. Must match a siteId from your THINCMS_SITES config (use thincms_list_sites to inspect). When omitted, the call uses the active site set by thincms_switch_site. | |
| columns | No | Grid columns for cards/compact/carousel (default: 3) | |
| enabled | No | Whether the collection is active (default: true) | |
| maxItems | No | Max items to show, 0 = all (default: 0) | |
| showLink | No | Show item links (default: true) | |
| showImage | No | Show item images (default: true) | |
| showTitle | No | Show item titles (default: true) | |
| sortOrder | No | Sort order for listing (default: 0) | |
| schemaType | No | Schema.org type to auto-emit on pages that render this collection via {{collection:slug}}. 'faq' emits FAQPage JSON-LD using each item's title as the question and body as the answer. Default 'none'. | |
| showRating | No | Show item ratings (default: true) | |
| autoAdvance | No | Auto-advance carousel/banner (default: false) | |
| description | No | Internal description/note | |
| displayMode | No | Display mode (default: cards) | |
| showSubtitle | No | Show item subtitles (default: true) | |
| advanceInterval | No | Seconds between auto-advance slides (default: 5) | |
| confirmProductionWrite | No | Acknowledge that this call may write to a configured production site (THINCMS_PRODUCTION_SITE_IDS env var). Required for any POST/PUT/PATCH/DELETE against a production-listed site; ignored otherwise. The error message lists which site triggered the requirement and recommends thincms_snapshot before any production write. |