Themes
Last updated
Last updated
The Themes resource is the primary way our system stores the Site themes that generally control the header, footer and CSS styles that can be reused and assigned to many Sites.
Warning: the Themes resource is currently only supported within the Site Builder and internally within the platform. If you are integrating this endpoint be aware that your published themes will be fully backwards compatible, but the specific fields and methods may change in the future.
The theme object contains the following fields
These configuration options are use to enable a Theme to override the content of any Site that is assigned that Theme. This is called a "master theme" within our platform and can be used to extend pages, page content, theme settings, plugins, etc from one central site_id
site_override
The below configuration would use the content identified in site_override_objects
when rendering the site if that site's language is set to en
site_override_objects
The below configuration would denote that most content of the Site should be pulled from the site_override
Site. This includes pages, the content on those pages, the navigation list (if applicable), and any plugins enabled.
POST /api/v2/themes/
PUT /api/v2/themes/:id/
Attribute
Type
Description
id
integer
unique id of the theme
active
boolean
Boolean to show this theme to users within the Site Builder
name
string
Unique slug for the theme. Can only contain lowercase letters, numbers and dashes
display_name
string
Theme name that is shown within the Site Builder
parent_id
integer
ID of the parent theme that this theme is extending
render_mode
string
The render mode to be used to render this theme. Choices are legacy
or mastertheme
extra_css
string
The CSS used to render this theme
footer_code
string
Extra HTML to add to all the site/theme pages right before the ending </body>
tag
footer_template
object
HTML content that will be rendered at the bottom of the page body
header_code
string
Extra HTML to add to all the site/theme pages right before the ending </head>
tag
header_template
object
HTML content that will be rendered at the top of the page body
module_templates
list
List of module templates that can be used to override the default HTML used for rendering of various modules
theme_html
string
The main wrapper HTML used to render the theme when using the legacy
theme rendering mode
site_override
object
Site override configuration for master themes. Contains a lookup of languages to site_id
to be used for overriding content. See site override options for more details
site_override_objects
list
List of site elements that should be overridden by the extended Site ID. See site override options for more details
preview_url
string
Hostname that is used to load the auto-generated thumbnail image used to display the theme in the Site Builder
added
timestamp
Date and time theme was created
modified
timestamp
Date and time theme was modified
user_id
integer
Reference id to the User that created this theme
Attribute
display_name
theme_html