thincms_create_content_block
Create reusable content blocks: raw HTML or Google reviews widgets with configurable options. Edit once, changes reflect everywhere.
Instructions
Create a new reusable content block. For type='html' (default) the content field holds raw HTML inserted wherever {{block:slug}} appears. For type='reviews-widget', the block renders the published Google reviews widget server-side with config options (maxReviews, displayMode, minRating, showDate, showAvatar). Edit once, updates everywhere.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name for the block | |
| slug | No | URL-safe slug (auto-generated from name if omitted) | |
| type | No | Block type. Default: 'html'. | |
| config | No | JSON config blob for typed widgets (e.g. reviews-widget: '{"maxReviews":5,"displayMode":"grid"}'). Ignored for type='html'. | |
| 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. | |
| content | No | HTML content (only used for type='html') | |
| enabled | No | Whether the block is active (default: true) | |
| sortOrder | No | Sort order for listing (default: 0) | |
| 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. |