CustomSite
詳細は、Salesforce オンラインヘルプの「Salesforce サイト」を参照してください。
Metadata メタデータ型を拡張し、その fullName 項目を継承します。
宣言的なメタデータファイルのサフィックスおよびディレクトリの場所
Lightning プラットフォームの CustomSite コンポーネントは、対応するパッケージディレクトリの sites ディレクトリに保存されます。ファイル名はサイト名に一致し、拡張子は .site です。
バージョン
Lightning プラットフォームの CustomSite コンポーネントは、API バージョン 14.0 以降で使用できます。
項目
SiteIframeWhiteListUrl
| 項目 | 項目の型 | 説明 |
|---|---|---|
| url | string | 必須。サイトまたは Experience Cloud サイトページのフレーム化を許可する信頼済みドメイン。example、example.com、*example.com、および http://example.com の形式が使用可能です。 |
SiteRedirectMapping
SiteRedirectMapping は、Salesforce サイトの URL リダイレクトルールを表します。詳細は、Salesforce ヘルプの「Salesforce サイトの URL リダイレクト」を参照してください。
| 項目 | 項目の型 | 説明 |
|---|---|---|
| action | SiteRedirect (string 型の列挙) | 必須。リダイレクトの種別。使用可能な string 値は次のとおりです。
|
| isActive | boolean | リダイレクトの状況 (有効または無効)。 |
| source | string | 必須。リダイレクトする URL。相対 URL である必要がありますが、.html や .php など、任意の有効な種類の拡張子にできます。 |
| target | string | 必須。ユーザのアクセス先とする新しい URL。相対 URL または http:// や https:// プレフィックスを含む完全修飾 URL にすることができます。 |
SiteWebAddress
Salesforce サイトの Web アドレスを表します。
| 項目 | 項目の型 | 説明 |
|---|---|---|
| certificate | string | カスタムドメインに関連付けられた証明書を識別します。Salesforce で HTTPS を提供するためにカスタムドメインが設定されている場合、この項目で使用する証明書を示します。 |
| domainName | string | 必須。Web サイトのドメイン。www.acme.com 形式で指定します。 |
| primary | boolean | 必須。これはプライマリドメインであるか (true)、否かを示します。false の場合は、プライマリドメインではありません。 |
宣言的なメタデータの定義のサンプル
サイトの XML 定義のサンプルを以下に示します。
1<?xml version="1.0" encoding="UTF-8"?>
2<CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
3 <active>true</active>
4 <allowHomePage>true</allowHomePage>
5 <allowStandardIdeasPages>true</allowStandardIdeasPages>
6 <allowStandardLookups>true</allowStandardLookups>
7 <allowStandardPortalPages>true</allowStandardPortalPages>
8 <allowStandardSearch>true</allowStandardSearch>
9 <authorizationRequiredPage>Unauthorized</authorizationRequiredPage>
10 <bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
11 <changePasswordPage>ChangePassword</changePasswordPage>
12 <chatterAnswersForgotPasswordConfirmPage>ChatterAnswersForgotPasswordConfirm</chatterAnswersForgotPasswordConfirmPage>
13 <chatterAnswersForgotPasswordPage>ChatterAnswersForgotPassword</chatterAnswersForgotPasswordPage>
14 <chatterAnswersHelpPage>ChatterAnswersHelp</chatterAnswersHelpPage>
15 <chatterAnswersLoginPage>ChatterAnswersLogin</chatterAnswersLoginPage>
16 <chatterAnswersRegistrationPage>ChatterAnswersRegistration</chatterAnswersRegistrationPage>
17 <clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
18 <customWebAddresses>
19 <domainName>www.testing123.com</domainName>
20 <primary>true</primary>
21 </customWebAddresses>
22 <siteIframeWhiteListUrl>
23 <url>example.com</url>
24 </siteIframeWhiteListUrl>
25 <favoriteIcon>myFavIcon</favoriteIcon>
26 <fileNotFoundPage>FileNotFound</fileNotFoundPage>
27 <genericErrorPage>Exception</genericErrorPage>
28 <inMaintenancePage>InMaintenance</inMaintenancePage>
29 <serverIsDown>MyServerDownResource</serverIsDown>
30 <indexPage>UnderConstruction</indexPage>
31 <masterLabel>customSite</masterLabel>
32 <portal>Customer Portal</portal>
33 <requireInsecurePortalAccess>false</requireInsecurePortalAccess>
34 <siteAdmin>admin@myco.org</siteAdmin>
35 <siteTemplate>SiteTemplate</siteTemplate>
36 <subdomain>myco</subdomain>
37</CustomSite>マニフェストファイル内のワイルドカードのサポート
このメタデータ型では、package.xml マニフェストファイル内のワイルドカード文字 * (アスタリスク) がサポートされます。マニフェストファイルの使用についての詳細は、「zip ファイルを使用したメタデータのリリースと取得」を参照してください。