Docs

Site profiles

uticms.sites.profiles · verified 2026-07-11

Overview

Scope
Site-specific public presentation configuration

Key concepts

Default Site
The Site record marked is_default; its displayed host derives from APP_URL rather than its domain field.
Additional Site
A non-default Site whose domain field contains newline-separated hosts.
Profile Overlay
Optional JSON that overrides selected base profile values without replacing the PHP declaration.
Menu Definition
PHP-declared menu key and capabilities; the profile supplies menu items.

Structure

  • Site Record
    • Tablesites
    • Fields
      • key
      • name
      • domain
      • is_default
      • is_deletable
      • profile_path
      • layout_driver
  • Profile Layers
    • BaseSiteLayoutDriver PHP implementation
    • Overlayresources CMS site profile JSON resolved from Site.profile_path
    • ResolvedSiteProfileManager runtime object
  • Menu And Slots
    • Menu Builderapp/Services/Cms/Site/Menu/MenuBuilder.php
    • Slot Resolverapp/Services/Cms/Site/Slots/SiteSlotResolver.php

Facts

  • The sites migration stores an indexed is_default flag and an is_deletable flag; Site::default queries the default record. authoritative
  • Site::additionalDomainHosts lowercases, trims, de-duplicates, and splits domain text on line breaks; Site::domainHosts returns these only for non-default sites. authoritative
  • A profile path defaults to <site key>/profile.json under cms.sites.profiles_path when profile_path is null. authoritative
  • A non-empty overlay shell or theme replaces its base value; settings and slots merge by key; menus merge through MenuOverlayHelper using declared menu keys. authoritative
  • An absent or empty overlay leaves the PHP layout profile as the resolved profile base. authoritative
  • SiteServiceProvider registers CMS-page, route, Blade, redirect, and view slot handlers. authoritative

How-to guides

Change Site Appearance

  1. resolve the site's registered layout driver and base profile
  2. change only supported overlay settings, slots, menu data, shell, or theme
  3. read the resulting profile through SiteProfileManager
  4. clear applicable profile/site caches and verify rendered public output

Add Site Specific Page Visibility

  1. leave page_sites empty when a page is visible on every resolved site
  2. create page_sites links only when visibility must be restricted to selected sites
  3. query with Page::visibleOnSite for public site filtering

Rules

Architectural rule

Do not put a new layout's menu declarations or appearance schema solely in JSON; declare them through its SiteLayoutDriver.