Expand description
A site’s branding: its name, logo and browser icon, kept in one place
(the branding site setting, edited under Settings → Branding)
and used everywhere: the admin sidebar and sign-in screens, and the
public site’s layout.
The logo and icon are pictures in the media library, stored as media
ids (logo, favicon). Sites set up before that kept uploaded files
instead (logo_storage_key, favicon_storage_key, under the tenant’s
branding/ folder); those still serve, and migrate_uploads moves
them into the media library.
Both pictures are served from stable addresses, /__cms-branding/logo
and /__cms-branding/favicon, so pages never need the media id.
Enums§
- Picture
- One of the two branding pictures.
Constants§
- SCOPE
- Site-setting scope holding the branding.
Functions§
- get
- The branding setting’s value (
{}when unset). - has
- Whether
brandinghas this picture, as a media id or an uploaded file. - load
- The picture’s bytes and mime type, if set and stored.
- migrate_
uploads - Move pictures uploaded before branding used the media library into it, so the Branding form can show and change them. Idempotent; a picture that can’t be read is left as it is.
- site_
name - The site’s name: the Branding site name, else the operator’s brand name for the tenant, else its display name.