← ClaudeAtlas

contentbox-boxlang-widget-developmentlisted

Use this skill when building ContentBox widgets, including BaseWidget patterns, render logic, dependency injection, editor metadata annotations, caching choices, and safe output/rendering practices.
ColdBox/skills · ★ 0 · AI & Automation · score 61
Install: claude install-skill ColdBox/skills
# ContentBox Widget Development (BoxLang) Build custom widgets for ContentBox CMS using BoxLang. Widgets are reusable, self-contained components that render dynamic content anywhere in pages, entries, sidebars, or layouts. ## Widget Architecture Widgets are singleton components that extend `contentbox.models.ui.BaseWidget`. They are discovered automatically from four locations (in priority order): 1. **Active theme widgets**: `themes/{activeTheme}/widgets/` 2. **Custom widgets**: `modules_app/contentbox-custom/_widgets/` 3. **Core widgets**: `modules/contentbox/widgets/` 4. **Module widgets**: Any registered module's `widgets/` folder Theme widgets override core/custom widgets of the same name. ## BaseWidget Properties All widgets inherit from `BaseWidget` which provides: ### Widget Metadata Properties | Property | Type | Description | |----------|------|-------------| | `name` | string | Widget display name | | `version` | string | Widget version | | `description` | string | Widget description | | `author` | string | Author name | | `authorURL` | string | Author website | | `forgeBoxSlug` | string | ForgeBox package slug | | `category` | string | Widget category (e.g., "Content", "Blog", "Navigation") | | `icon` | string | Icon name (used in admin UI) | ### Auto-Injected Services Every widget receives these services via WireBox DI: | Property | DSL | Description | |----------|-----|-------------| | `siteService` | `siteService@contentbox` | Multi-site management