---
schema_version: "1"
id: 5d8f88a8ebadd79da526f93082b4b1bbe1ef13891cdf7d818145c7b3834954dd
title: CommunityTemplateDefinition
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_communitytemplatedefinition.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_communitytemplatedefinition.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9ae12dbab1e61181cbd3939c075cc900bed5faae78c4d3c8e792ee3e683a53f6
description: Represents the definition of an Experience Builder site template. This type extends the Metadata metadata type and inherits its fullName field.
---
# CommunityTemplateDefinition

Represents the definition of an Experience Builder site template. 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

CommunityTemplateDefinition components have the suffix .communityTemplateDefinition and are stored in the communityTemplateDefinitions folder.

## Version

CommunityTemplateDefinition 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="d256959e99">Field Name</th>

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

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

            </tr>

          </thead>

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

              <td class="entry" headers="d256959e102" data-title="Field Type">CommunityBase​Template (enumeration of type
                string)</td>

              <td class="entry" headers="d256959e105" data-title="Description">Denotes that this CommunityTemplateDefinition was created in API
                version 41.0 or later. The only valid value is <samp class="codeph nolang">c</samp>. This field is available in API
                41.0 and later.</td>

            </tr>

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

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

              <td class="entry" headers="d256959e105" data-title="Description">The list of preview images and feature highlights of this
                CommunityTemplateDefinition.</td>

            </tr>

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

              <td class="entry" headers="d256959e102" data-title="Field Type">CommunityTemplate​Category (<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="d256959e105" data-title="Description">Required. The optimized use case of this
                CommunityTemplateDefinition. Valid values are: <ul class="ul bulletList">
                  <li class="li"><samp class="codeph nolang">Commerce</samp></li>

                  <li class="li"><samp class="codeph nolang">IT</samp></li>

                  <li class="li"><samp class="codeph nolang">Marketing</samp></li>

                  <li class="li"><samp class="codeph nolang">Sales</samp></li>

                  <li class="li"><samp class="codeph nolang">Service</samp></li>

                </ul>
              </td>

            </tr>

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

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

              <td class="entry" headers="d256959e105" data-title="Description">The set of branding properties associated with this
                CommunityTemplateDefinition, as defined in the Theme panel in
                Experience Builder. Available in API version 40.0 and later.<p class="p">In
                  API version 44.0 and later, this field is read-only and can be
                  implemented in <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_communitythemedefinition.htm#meta_communitythemedefinition" title="Represents the definition of a theme for an Experience Builder site. This type extends the Metadata metadata type and inherits its fullName field.">CommunityThemeDefinition</a>.</p>
              </td>

            </tr>

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

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

              <td class="entry" headers="d256959e105" data-title="Description">Required. The assigned theme definition for this
                CommunityTemplateDefinition.</td>

            </tr>

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

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

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

            </tr>

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

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

              <td class="entry" headers="d256959e105" data-title="Description">False by default. Determines if deleting this
                CommunityTemplateDefinition attempts to delete other directly or
                indirectly referenced objects automatically, for example, <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_communitythemedefinition.htm" title="Represents the definition of a theme for an Experience Builder site. This type extends the Metadata metadata type and inherits its fullName field.">CommunityThemeDefinition</a>, <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_flexipage.htm" title="Represents the metadata associated with a Lightning page. A Lightning page represents a customizable screen made up of regions containing Lightning components.">Flexipage</a>, or <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_staticresource.htm#meta_staticresource" title="Represents a static resource file, often a code library in a ZIP file. Static resources allow you to upload content that you can reference in a Visualforce page, including archives (such as .zip and .jar files), images, style sheets, JavaScript, and other files. Static resources can be used only within your Salesforce org, so you can’t host content here for other apps or websites.">StaticResource</a>. Values are true or false.</td>

            </tr>

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

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

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

            </tr>

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

              <td class="entry" headers="d256959e102" data-title="Field Type"><a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_network.htm#NavigationLinkSet">NavigationLinkSet</a></td>

              <td class="entry" headers="d256959e105" data-title="Description">The navigation menu associated with this
                CommunityTemplateDefinition. A navigation menu consists of items
                that users can click to go to other parts of the site. Available in
                API versions 37.0 to 46.0. In API versions 47.0 and later, use
                NavigationMenu.</td>

            </tr>

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

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

              <td class="entry" headers="d256959e105" data-title="Description">The list of FlexiPage of this
                CommunityTemplateDefinition.</td>

            </tr>

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

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

              <td class="entry" headers="d256959e105" data-title="Description">Defines the name of the publisher as seen in the Change Theme
                wizard. 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>

          </tbody>

        </table>

## CommunityTemplateBundleInfo

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



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

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

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

            </tr>

          </thead>

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

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

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

            </tr>

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

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

              <td class="entry" headers="d256959e363" 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
                CommunityTemplateDefinition.</td>

            </tr>

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

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

              <td class="entry" headers="d256959e363" data-title="Description">Required. An integer specifying the position of this
                CommunityTemplateBundleInfo relative to others of the same
                <span class="keyword parmname">type</span> within its
                CommunityTemplateDefinition. <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="d256959e357" data-title="Field Name"><span class="keyword parmname">title</span></td>

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

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

            </tr>

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

              <td class="entry" headers="d256959e360" 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="d256959e363" data-title="Description">Required. Stores descriptive information about the template
                that’s included in the export. The template powers the interface of
                the Experience Creation Wizard. Valid values are:<ul class="ul bulletList">
                  <li class="li">
                    <samp class="codeph nolang">Highlight</samp>—This
                    CommunityTemplateBundleInfo is used as a highlighted
                    feature. Up to 4 are supported.
                  </li>

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

                </ul>
              </td>

            </tr>

          </tbody>

        </table>

## CommunityTemplatePageSetting

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



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

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

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

            </tr>

          </thead>

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

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

              <td class="entry" headers="d256959e505" data-title="Description">Required. The list of FlexiPage of this
                CommunityTemplateDefinition.</td>

            </tr>

            <tr>
              <td class="entry" headers="d256959e499" data-title="Field Name"><span class="keyword parmname" id="field_themeLayout_name"><a name="field_themeLayout_name"><!-- --></a>themeLayout</span></td>

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

              <td class="entry" headers="d256959e505" data-title="Description">Required. The name of the FlexiPage
                for the theme layout.<p class="p">This field is available in API version 39.0
                  and later.</p>
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is an example of a CommunityTemplateDefinition component.

<?xml version="1.0" encoding="UTF-8"?>
<CommunityTemplateDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
    <baseTemplate\>c</baseTemplate\>
    <bundlesInfo\>
        <description\>Feature Description</description\>
        <order\>1</order\>
        <title\>Feature Heading</title\>
        <type\>Highlight</type\>
    </bundlesInfo\>
    <bundlesInfo\>
        <image\>siteAsset\_2dbe594eb6794173af78da264cd6a4a7</image\>
        <order\>1</order\>
        <title\>Preview Image</title\>
        <type\>PreviewImage</type\>
    </bundlesInfo\>
    <category\>Sales</category\>
    <defaultThemeDefinition\>communityTemplate</defaultThemeDefinition\>
    <description\>This is an Experience Builder template</description\>
    <enableExtendedCleanUpOnDelete\>true</enableExtendedCleanUpOnDelete\>
    <masterLabel\>communityTemplate</masterLabel\>
    <navigationLinkSet\>
        <navigationMenuItem\>
            <label\>Topics</label\>
            <position\>0</position\>
            <publiclyAvailable\>true</publiclyAvailable\>
            <target\>ShowMoreTopics</target\>
            <type\>NavigationalTopic</type\>
        </navigationMenuItem\>
    </navigationLinkSet\>
    <pageSetting\>
        <page\>communityTemplate\_Report\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Topic\_Catalog</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Check\_Password</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Login</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Error</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_User\_Settings</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Login</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Login</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Stream\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Sfdc\_Page</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Group\_Detail</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Report\_Related\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Register</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Login</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_User\_Profile</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Case\_Detail</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Stream\_Related\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Dashboard\_Detail</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Group\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Canvasapp\_Page</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Login\_Error</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Login</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Create\_Record</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Group\_Related\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Search</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_File\_Detail</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Case\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_User\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_File\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Question\_Detail</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Dashboard\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Related\_Record\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_File\_Related\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Record\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Forgot\_Password</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Login</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Home</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Dashboard\_Related\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Account\_Management</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Case\_Related\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_User\_Related\_List</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Stream\_Detail</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Topic\_Detail</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Messages</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Report\_Detail</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Record\_Detail</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Feed\_Detail</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
    <pageSetting\>
        <page\>communityTemplate\_Contact\_Support</page\>
        <themeLayout\>communityTemplate\_themeLayout\_Default</themeLayout\>
    </pageSetting\>
</CommunityTemplateDefinition\>

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\>MyTemplate</members\>
        <name\>CommunityTemplateDefinition</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).