CustomSite
詳細は、Salesforce オンラインヘルプの「Salesforce サイト」を参照してください。
Metadata メタデータ型を拡張し、その fullName 項目を継承します。
宣言的なメタデータファイルのサフィックスおよびディレクトリの場所
Lightning プラットフォームの CustomSite コンポーネントは、対応するパッケージディレクトリの sites ディレクトリに保存されます。ファイル名はサイト名に一致し、拡張子は .site です。
バージョン
Lightning プラットフォームの CustomSite コンポーネントは、API バージョン 14.0 以降で使用できます。
項目
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 | この項目はメタデータ API バージョン 43.0 では表示されますが、機能しないため、空白のままにする必要があります。 |
| 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 </customWebAddress>
22 <favoriteIcon>myFavIcon</favoriteIcon>
23 <fileNotFoundPage>FileNotFound</fileNotFoundPage>
24 <genericErrorPage>Exception</genericErrorPage>
25 <inMaintenancePage>InMaintenance</inMaintenancePage>
26 <serverIsDown>MyServerDownResource</serverIsDown>
27 <indexPage>UnderConstruction</indexPage>
28 <masterLabel>customSite</masterLabel>
29 <portal>Customer Portal</portal>
30 <requireInsecurePortalAccess>false</requireInsecurePortalAccess>
31 <siteAdmin>admin@myco.org</siteAdmin>
32 <siteTemplate>SiteTemplate</siteTemplate>
33 <subdomain>myco</subdomain>
34</CustomSite>