Newer Version Available
CommunityTemplateDefinition
Represents the definition of a community
template.
This type extends the Metadata
metadata type and inherits its fullName field.
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 object is available only if Salesforce Communities is enabled in your org.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| baseTemplate | CommunityBaseTemplate (enumeration of type string) | Denotes that this CommunityTemplateDefinition was created in API version 41.0 or later. The valid value is CommunityApp. This field is available in API 41.0 and later. |
| bundlesInfo | CommunityTemplateBundleInfo [ ] | Required. The list of preview images and feature descriptions of this CommunityTemplateDefinition. |
| category | CommunityTemplateCategory (enumeration of type string) | Required. The optimized use case of this
CommunityTemplateDefinition. Valid values are:
|
| defaultBrandingSet | string | The set of branding properties associated with this CommunityTemplateDefinition, as defined in the Branding panel in Community Builder. Available in API version 40.0 and later. |
| defaultThemeDefinition | string | Required. The assigned theme definition for this CommunityTemplateDefinition. |
| description | string | The optional description text of this CommunityTemplateDefinition. |
| enableExtendedCleanupUpOnDelete | boolean | Determines if deleting this CommunityTemplateDefinition attempts to delete other directly or indirectly referenced objects automatically, for example, CommunityThemeDefinition, Flexipage, or StaticResource. |
| masterLabel | string | Required. The label for this CommunityTemplateDefinition, which displays in Setup. |
| navigationLinkSet | NavigationLinkSet | The navigation menu associated with this CommunityTemplateDefinition. A navigation menu consists of items that users can click to go to other parts of the community. Available in API version 40.0 and later. |
| pageSetting | CommunityTemplatePageSetting [ ] | Required. The list of FlexiPages of this CommunityTemplateDefinition. |
CommunityTemplateBundleInfo
| Field Name | Field Type | Description |
|---|---|---|
| description | string | The optional description text of its CommunityTemplateBundleInfo. |
| image | string | Required only when the type is PreviewImage, otherwise this field is optional. A preview image for this CommunityTemplateDefinition. |
| order | int | Required. An integer specifying the position of this CommunityTemplateBundleInfo relative to others of the same Type within its CommunityTemplateDefinition. 1 is the first position, 3 is the max position for PreviewImage type, and 4 is the max position for Highlight type. |
| title | string | Required. The title of this CommunityTemplateBundleInfo to use in code. |
| type | CommunityTemplateBundleInfoType (enumeration of type string) | Required. Stores descriptive information about the template that
is included in the export (currently limited to Features and Preview
Images). The template powers the UI of the Community Creation
Wizard. Valid values are:
|
Declarative Metadata Sample Definition
The following is an example of a CommunityTemplateDefinition component.
1<?xml version="1.0" encoding="UTF-8"?>
2<CommunityTemplateDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
3 <bundlesInfo>
4 <description>ax</description>
5 <order>1</order>
6 <title>ax</title>
7 <type>Highlight</type>
8 </bundlesInfo>
9 <bundlesInfo>
10 <image>siteAsset_82806ab739204fa99e657012c181c87c</image>
11 <order>1</order>
12 <title>siteAsset_82806ab739204fa99e657012c181c87c</title>
13 <type>PreviewImage</type>
14 </bundlesInfo>
15 <category>Sales</category>
16 <defaultBrandingSet>ax</defaultBrandingSet>
17 <defaultThemeDefinition>ax</defaultThemeDefinition>
18 <description>ax</description>
19 <enableExtendedCleanUpOnDelete>true</enableExtendedCleanUpOnDelete>
20 <masterLabel>ax</masterLabel>
21 <navigationLinkSet>
22 <navigationMenuItem>
23 <label>Topics</label>
24 <position>1</position>
25 <publiclyAvailable>true</publiclyAvailable>
26 <target>ShowMoreTopics</target>
27 <type>NavigationalTopic</type>
28 </navigationMenuItem>
29 </navigationLinkSet>
30 <pageSetting>
31 <page>ax_Report_List</page>
32 <themeLayout>ax_themeLayout_Inner</themeLayout>
33 </pageSetting>
34 <pageSetting>
35 <page>ax_Topic_Catalog</page>
36 <themeLayout>ax_themeLayout_Inner</themeLayout>
37 </pageSetting>
38 <pageSetting>
39 <page>ax_Check_Password</page>
40 <themeLayout>ax_themeLayout_Login</themeLayout>
41 </pageSetting>
42 <pageSetting>
43 <page>ax_Error</page>
44 <themeLayout>ax_themeLayout_Inner</themeLayout>
45 </pageSetting>
46 <pageSetting>
47 <page>ax_User_Settings</page>
48 <themeLayout>ax_themeLayout_Inner</themeLayout>
49 </pageSetting>
50 <pageSetting>
51 <page>ax_Login</page>
52 <themeLayout>ax_themeLayout_Login</themeLayout>
53 </pageSetting>
54 <pageSetting>
55 <page>ax_Group_Detail</page>
56 <themeLayout>ax_themeLayout_Inner</themeLayout>
57 </pageSetting>
58 <pageSetting>
59 <page>ax_Sfdc_Page</page>
60 <themeLayout>ax_themeLayout_Inner</themeLayout>
61 </pageSetting>
62 <pageSetting>
63 <page>ax_Report_Related_List</page>
64 <themeLayout>ax_themeLayout_Inner</themeLayout>
65 </pageSetting>
66 <pageSetting>
67 <page>ax_Register</page>
68 <themeLayout>ax_themeLayout_Login</themeLayout>
69 </pageSetting>
70 <pageSetting>
71 <page>ax_Case_Detail</page>
72 <themeLayout>ax_themeLayout_Inner</themeLayout>
73 </pageSetting>
74 <pageSetting>
75 <page>ax_User_Profile</page>
76 <themeLayout>ax_themeLayout_Inner</themeLayout>
77 </pageSetting>
78 <pageSetting>
79 <page>ax_Dashboard_Detail</page>
80 <themeLayout>ax_themeLayout_Inner</themeLayout>
81 </pageSetting>
82 <pageSetting>
83 <page>ax_Group_List</page>
84 <themeLayout>ax_themeLayout_Inner</themeLayout>
85 </pageSetting>
86 <pageSetting>
87 <page>ax_Canvasapp_Page</page>
88 <themeLayout>ax_themeLayout_Inner</themeLayout>
89 </pageSetting>
90 <pageSetting>
91 <page>ax_Login_Error</page>
92 <themeLayout>ax_themeLayout_Login</themeLayout>
93 </pageSetting>
94 <pageSetting>
95 <page>ax_Search</page>
96 <themeLayout>ax_themeLayout_Inner</themeLayout>
97 </pageSetting>
98 <pageSetting>
99 <page>ax_Create_Record</page>
100 <themeLayout>ax_themeLayout_Inner</themeLayout>
101 </pageSetting>
102 <pageSetting>
103 <page>ax_Group_Related_List</page>
104 <themeLayout>ax_themeLayout_Inner</themeLayout>
105 </pageSetting>
106 <pageSetting>
107 <page>ax_User_List</page>
108 <themeLayout>ax_themeLayout_Inner</themeLayout>
109 </pageSetting>
110 <pageSetting>
111 <page>ax_Case_List</page>
112 <themeLayout>ax_themeLayout_Inner</themeLayout>
113 </pageSetting>
114 <pageSetting>
115 <page>ax_Dashboard_List</page>
116 <themeLayout>ax_themeLayout_Inner</themeLayout>
117 </pageSetting>
118 <pageSetting>
119 <page>ax_Question_Detail</page>
120 <themeLayout>ax_themeLayout_Inner</themeLayout>
121 </pageSetting>
122 <pageSetting>
123 <page>ax_Related_Record_List</page>
124 <themeLayout>ax_themeLayout_Inner</themeLayout>
125 </pageSetting>
126 <pageSetting>
127 <page>ax_Record_List</page>
128 <themeLayout>ax_themeLayout_Inner</themeLayout>
129 </pageSetting>
130 <pageSetting>
131 <page>ax_Forgot_Password</page>
132 <themeLayout>ax_themeLayout_Login</themeLayout>
133 </pageSetting>
134 <pageSetting>
135 <page>ax_Home</page>
136 <themeLayout>ax_themeLayout_Inner</themeLayout>
137 </pageSetting>
138 <pageSetting>
139 <page>ax_Dashboard_Related_List</page>
140 <themeLayout>ax_themeLayout_Inner</themeLayout>
141 </pageSetting>
142 <pageSetting>
143 <page>ax_User_Related_List</page>
144 <themeLayout>ax_themeLayout_Inner</themeLayout>
145 </pageSetting>
146 <pageSetting>
147 <page>ax_Case_Related_List</page>
148 <themeLayout>ax_themeLayout_Inner</themeLayout>
149 </pageSetting>
150 <pageSetting>
151 <page>ax_Topic_Detail</page>
152 <themeLayout>ax_themeLayout_Inner</themeLayout>
153 </pageSetting>
154 <pageSetting>
155 <page>ax_Messages</page>
156 <themeLayout>ax_themeLayout_Inner</themeLayout>
157 </pageSetting>
158 <pageSetting>
159 <page>ax_Report_Detail</page>
160 <themeLayout>ax_themeLayout_Inner</themeLayout>
161 </pageSetting>
162 <pageSetting>
163 <page>ax_Record_Detail</page>
164 <themeLayout>ax_themeLayout_Inner</themeLayout>
165 </pageSetting>
166 <pageSetting>
167 <page>ax_Feed_Detail</page>
168 <themeLayout>ax_themeLayout_Inner</themeLayout>
169 </pageSetting>
170 <pageSetting>
171 <page>ax_Contact_Support</page>
172 <themeLayout>ax_themeLayout_Inner</themeLayout>
173 </pageSetting>
174</CommunityTemplateDefinition>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>MyTemplate</members>
5 <name>CommunityTemplateDefinition</name>
6 </types>
7 <version>41.0</version>
8</Package>