Newer Version Available
CommunityThemeDefinition
Represents the definition of a community
theme.This type extends the Metadata
metadata type and inherits its fullName field.
File Suffix and Directory Location
CommunityThemeDefinition components have the suffix .communityThemeDefinition and are stored in the communityThemeDefinitions folder.
Version
CommunityThemeDefinition components are available in API version 38.0 and later.
Special Access Rules
This object is available only if Salesforce Communities is enabled in your org.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| customThemeLayoutType | CommunityCustomThemeLayoutType [ ] | The list of custom theme layout types available to the theme layout. This field is available in API version 39.0 and later. |
| description | string | The optional description text of this CommunityThemeDefinition. |
| enableExtendedCleanupUpOnDelete | boolean | Determines if deleting this CommunityThemeDefinition attempts to delete other directly or indirectly referenced objects automatically, for example, FlexiPage. |
| masterLabel | string | Required. The label for this CommunityThemeDefinition, which displays in Setup. |
| themeSetting | CommunityThemeSetting [ ] | Required. The list of settings for this CommunityThemeDefinition. |
CommunityCustomThemeLayoutType
| Field Name | Field Type | Description |
|---|---|---|
| description | string | The description of the custom theme layout type. |
| label | string | Required. The name of the custom theme layout type. The values Inner, Home, and Login are reserved. |
CommunityThemeSetting
| Field Name | Field Type | Description |
|---|---|---|
| customThemeLayoutType | string | Required when themeLayoutType is not specified. The custom theme layout type associated with the theme layout. This field and themeLayoutType are mutually exclusive; you can’t specify both. This field is available in API version 39.0 and later. |
| themeLayout | string | Required. The configuration and layout for this theme. |
| themeLayoutType | CommunityThemeLayoutType (enumeration of type string) | Required when customThemeLayoutType is not specified. The default theme layout type associated with the theme layout. Valid values are Inner, Home, or Login. This field and customThemeLayoutType are mutually exclusive; you can’t specify both. |
Declarative Metadata Sample Definition
The following is an example of a CommunityThemeDefinition component.
1<CommunityThemeDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
2 <enableExtendedCleanUpOnDelete>true</enableExtendedCleanUpOnDelete>
3 <masterLabel>ax_theme</masterLabel>
4 <themeSetting>
5 <themeLayout>ax_theme_napili_themeLayout_home</themeLayout>
6 <themeLayoutType>Inner</themeLayoutType>
7 </themeSetting>
8</CommunityThemeDefinition>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>MyTheme</members>
5 <name>CommunityThemeDefinition</name>
6 </types>
7 <version>39.0</version>
8</Package>