contentbox-boxlang-multi-sitelisted
Install: claude install-skill ColdBox/skills
# ContentBox Multi-Site Management (BoxLang)
Build and manage multi-site installations in ContentBox CMS using BoxLang. ContentBox supports running multiple sites from a single installation with shared or isolated content, themes, and settings.
## Multi-Site Architecture
### Site Entity
The `Site` entity (`models/system/Site.cfc`) represents a single site:
```boxlang
property name="siteService" inject="siteService@contentbox"
// Site properties
site.getSiteID()
site.getSlug() // Unique site identifier
site.getName()
site.getDescription()
site.getDomain() // Primary domain
site.getSiteURL() // Full site URL
site.getIsActive()
site.getCreatedDate()
site.getModifiedDate()
```
### SiteService
```boxlang
property name="siteService" inject="siteService@contentbox"
// Site CRUD
siteService.getAll() // Get all sites
siteService.findBySlug( slug ) // Find site by slug
siteService.findByDomain( domain ) // Find site by domain
siteService.getCurrentSite() // Get current site from request
siteService.save( site ) // Save site
siteService.delete( site ) // Delete site
// Site resolution
siteService.resolveSiteByDomain() // Auto-resolve from request domain
siteService.setCurrentSite( site ) // Set current working site
```
## Site Resolution
ContentBox resolves the current site based on:
1. **Domain matching** — matches request domain to site's `domain` field
2.