---
schema_version: "1"
id: ff46b215025774e0780f0b4a6217629cfb16ea08ca313d7a155c145d9d8ac6c8
title: CommunityThemeDefinition
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_communitythemedefinition.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_communitythemedefinition.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: bffa47d9230e730b69678e8ff2de1c78bc0a53d084d270da750b98818366726a
description: Represents the definition of a theme for an Experience Builder site. This type extends the Metadata metadata type and inherits its fullName field.
---
# CommunityThemeDefinition

Represents the definition of a theme for an Experience Builder site. This type extends the Metadata metadata type and inherits its fullName field.

![Important](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png)

#### Important

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

## 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 type is available only if Salesforce Digital Experiences is enabled in your org.

## Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d258644e98">Field Name</th>

              <th class="featureTableHeader  " id="d258644e101">Field Type</th>

              <th class="featureTableHeader  " id="d258644e104">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d258644e98" data-title="Field Name"><span class="keyword parmname">bundlesInfo</span></td>

              <td class="entry" headers="d258644e101" data-title="Field Type">
                <a class="xref" href="#CommunityThemeBundleInfo">CommunityThemeBundleInfo</a>[]
              </td>

              <td class="entry" headers="d258644e104" data-title="Description">If specified, at least one preview image and one highlight are required. Up to
                3 preview images and 4 highlights are supported. Available in API version 44.0 and
                later</td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e98" data-title="Field Name"><span class="keyword parmname" id="field_customThemeLayoutType_name"><a name="field_customThemeLayoutType_name"><!-- --></a>customThemeLayoutType</span></td>

              <td class="entry" headers="d258644e101" data-title="Field Type">
                <a class="xref" href="#CommunityCustomThemeLayoutType">CommunityCustomThemeLayoutType</a>[]
              </td>

              <td class="entry" headers="d258644e104" data-title="Description"><span class="ph" id="field_customThemeLayoutType_desc"><a name="field_customThemeLayoutType_desc"><!-- --></a>The list of custom theme layout types
                  available to the theme layout.</span></td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e98" data-title="Field Name"><span class="keyword parmname">defaultBrandingSet</span></td>

              <td class="entry" headers="d258644e101" data-title="Field Type">string</td>

              <td class="entry" headers="d258644e104" data-title="Description">The set of branding properties associated with this CommunityThemeDefinition,
                as defined in the Theme panel in Experience Builder. Available in API version 44.0
                and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e98" data-title="Field Name"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d258644e101" data-title="Field Type">string</td>

              <td class="entry" headers="d258644e104" data-title="Description">The optional description text of this CommunityThemeDefinition.</td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e98" data-title="Field Name"><span class="keyword parmname">enableExtendedCleanUp​OnDelete</span></td>

              <td class="entry" headers="d258644e101" data-title="Field Type">boolean</td>

              <td class="entry" headers="d258644e104" data-title="Description">False by default. Determines if deleting this CommunityThemeDefinition attempts
                to delete other directly or indirectly referenced objects automatically, for
                example, FlexiPage. Values are true or false.</td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e98" data-title="Field Name"><span class="keyword parmname">masterLabel</span></td>

              <td class="entry" headers="d258644e101" data-title="Field Type">string</td>

              <td class="entry" headers="d258644e104" data-title="Description">Required. The label for this CommunityThemeDefinition, which displays in Setup.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e98" data-title="Field Name"><span class="keyword parmname">publisher</span></td>

              <td class="entry" headers="d258644e101" data-title="Field Type">string</td>

              <td class="entry" headers="d258644e104" data-title="Description">Defines the name of the publisher as seen in the wizard for creating Experience
                Builder sites. If no name is provided, the name of the org from which the package
                was originally exported is used.<p class="p">This field is available in API version 45.0 and
                  later.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e98" data-title="Field Name"><span class="keyword parmname">themeRouteOverride</span></td>

              <td class="entry" headers="d258644e101" data-title="Field Type">
                <a class="xref" href="#CommunityThemeRouteOverride">CommunityThemeRouteOverride</a>[]
              </td>

              <td class="entry" headers="d258644e104" data-title="Description">List of theme layout type overrides for flexipages (currently only for home).
                Available in API version 44.0 and later.</td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e98" data-title="Field Name"><span class="keyword parmname">themeSetting</span></td>

              <td class="entry" headers="d258644e101" data-title="Field Type">
                <a class="xref" href="#CommunityThemeSetting">CommunityTheme Setting</a>
                []
              </td>

              <td class="entry" headers="d258644e104" data-title="Description">Required. The list of settings for this CommunityThemeDefinition.</td>

            </tr>

          </tbody>

        </table>

## CommunityThemeBundleInfo

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d258644e271">Field Name</th>

              <th class="featureTableHeader  " id="d258644e274">Field Type</th>

              <th class="featureTableHeader  " id="d258644e277">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d258644e271" data-title="Field Name"><span class="keyword parmname">description</span></td>

              <td class="entry" headers="d258644e274" data-title="Field Type">string</td>

              <td class="entry" headers="d258644e277" data-title="Description">The optional description text of its CommunityThemeBundleInfo.</td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e271" data-title="Field Name"><span class="keyword parmname">image</span></td>

              <td class="entry" headers="d258644e274" data-title="Field Type">string</td>

              <td class="entry" headers="d258644e277" data-title="Description">Required only when the <span class="keyword parmname">type</span> is <samp class="codeph nolang">PreviewImage</samp>, otherwise this field is optional. A preview image for this
                CommunityThemeDefinition.</td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e271" data-title="Field Name"><span class="keyword parmname">order</span></td>

              <td class="entry" headers="d258644e274" data-title="Field Type">int</td>

              <td class="entry" headers="d258644e277" data-title="Description">Required. An integer specifying the position of this CommunityThemeBundleInfo
                relative to others of the same <span class="keyword parmname">type</span> within its
                CommunityThemeDefinition. <samp class="codeph nolang">1</samp> is the first
                position, <samp class="codeph nolang">3</samp> is the maximum position for <samp class="codeph nolang">PreviewImage</samp> type, and <samp class="codeph nolang">4</samp> is the maximum position for the <samp class="codeph nolang">Highlight</samp> type.</td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e271" data-title="Field Name"><span class="keyword parmname">title</span></td>

              <td class="entry" headers="d258644e274" data-title="Field Type">string</td>

              <td class="entry" headers="d258644e277" data-title="Description">Required. The title of this CommunityThemeBundleInfo to use in code.</td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e271" data-title="Field Name"><span class="keyword parmname">type</span></td>

              <td class="entry" headers="d258644e274" data-title="Field Type">CommunityTemplate​BundleInfoType (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d258644e277" data-title="Description">Required. Stores descriptive information about the theme that is included in
                the export. Valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Highlight</samp>—This CommunityThemeBundleInfo
                    is used as a highlighted feature. Up to 4 are supported.
                  </li>

                  <li class="li">
                    <samp class="codeph nolang">PreviewImage</samp>—This
                    CommunityThemeBundleInfo is used as a preview image. Up to 3 are supported.
                  </li>

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## 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. |

## CommunityThemeRouteOverride

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d258644e485">Field Name</th>

              <th class="featureTableHeader  " id="d258644e488">Field Type</th>

              <th class="featureTableHeader  " id="d258644e491">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d258644e485" data-title="Field Name"><span class="keyword parmname">customThemeLayoutType</span></td>

              <td class="entry" headers="d258644e488" data-title="Field Type">string</td>

              <td class="entry" headers="d258644e491" data-title="Description">Required when <span class="keyword parmname">themeLayoutType</span> isn’t specified. Provides
                the custom theme layout type associated with the theme layout. This field and
                <span class="keyword parmname">themeLayoutType</span> are mutually exclusive; you can’t specify
                both.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e485" data-title="Field Name"><span class="keyword parmname">pageAttributes</span></td>

              <td class="entry" headers="d258644e488" data-title="Field Type">string</td>

              <td class="entry" headers="d258644e491" data-title="Description">Required. Specifies the attributes of the site page for which the default theme
                layout type is overridden. The only valid value is <samp class="codeph nolang">{"PageName":"Home"}</samp>.</td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e485" data-title="Field Name"><span class="keyword parmname">pageType</span></td>

              <td class="entry" headers="d258644e488" data-title="Field Type">string</td>

              <td class="entry" headers="d258644e491" data-title="Description">
                <p dir="ltr" class="p">Required. Specifies the type of the site page for which the default
                  theme layout type is overridden. The only valid value is <samp class="codeph nolang">comm__standardPage</samp>.</p>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d258644e485" data-title="Field Name"><span class="keyword parmname">themeLayoutType</span></td>

              <td class="entry" headers="d258644e488" data-title="Field Type">CommunityTheme​LayoutType (<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title">enumeration</a> of type string)</td>

              <td class="entry" headers="d258644e491" data-title="Description">Required if <span class="keyword parmname">customThemeLayoutType</span> isn’t specified.
                Provides the default theme layout type associated with the theme layout. Valid
                values are <samp class="codeph nolang">Inner</samp>, <samp class="codeph nolang">Home</samp>, or <samp class="codeph nolang">Login</samp>. This field and
                <span class="keyword parmname">customThemeLayoutType</span> are mutually exclusive; you can’t
                specify both.
              </td>

            </tr>

          </tbody>

        </table>

## CommunityTheme Setting

| Field Name | Field Type | Description |
| --- | --- | --- |
| customThemeLayoutType | string | Required when themeLayoutType isn’t specified. The custom theme layout type associated with the theme layout. This field and themeLayoutType are mutually exclusive; you can’t specify both. |
| themeLayout | string | Required. The configuration and layout for this theme. |
| themeLayoutType | CommunityTheme​LayoutType ([enumeration](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_objects_intro.htm#enumeration_title) of type string) | Required when customThemeLayoutType isn’t 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.

<?xml version="1.0" encoding="UTF-8"?>
<CommunityThemeDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
    <bundlesInfo\>
        <description\>Batman Feature1 description</description\>
        <order\>1</order\>
        <title\>Batman Feature1</title\>
        <type\>Highlight</type\>
    </bundlesInfo\>
    <bundlesInfo\>
        <image\>siteAsset\_d90e2d5ce4cf4d8899e233c051091246</image\>
        <order\>1</order\>
        <title\>siteAsset\_d90e2d5ce4cf4d8899e233c051091246</title\>
        <type\>PreviewImage</type\>
    </bundlesInfo\>
    <defaultBrandingSet\>Batman</defaultBrandingSet\>
    <description\>Batman theme</description\>
    <enableExtendedCleanUpOnDelete\>true</enableExtendedCleanUpOnDelete\>
    <masterLabel\>Batman</masterLabel\>
    <themeRouteOverride\>
        <pageAttributes\>{&quot;PageName&quot;:&quot;Home&quot;}</pageAttributes\>
        <pageType\>comm\_\_standardPage</pageType\>
        <themeLayoutType\>Home</themeLayoutType\>
    </themeRouteOverride\>
    <themeSetting\>
        <themeLayout\>Batman\_themeLayout\_Login</themeLayout\>
        <themeLayoutType\>Login</themeLayoutType\>
    </themeSetting\>
    <themeSetting\>
        <themeLayout\>Batman\_themeLayout\_Home</themeLayout\>
        <themeLayoutType\>Home</themeLayoutType\>
    </themeSetting\>
    <themeSetting\>
        <themeLayout\>Batman\_themeLayout\_Default</themeLayout\>
        <themeLayoutType\>Inner</themeLayoutType\>
    </themeSetting\>
</CommunityThemeDefinition\>

The following is an example package.xml that references the previous definition.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types\>
        <members\>Batman</members\>
        <name\>BrandingSet</name\>
    </types\>
    <types\>
        <members\>Batman</members\>
        <name\>CommunityThemeDefinition</name\>
    </types\>
    <types\>
        <members\>Batman\_themeLayout\_Default</members\>
        <members\>Batman\_themeLayout\_Home</members\>
        <members\>Batman\_themeLayout\_Login</members\>
        <name\>FlexiPage</name\>
    </types\>
    <types\>
        <members\>siteAsset\_d90e2d5ce4cf4d8899e233c051091246</members\>
        <name\>StaticResource</name\>
    </types\>
    <version\>68.0</version\>
</Package\>

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).