この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える
Clouds with binary code floating aboveCloud with binary code floating above

No Results

Search Tips:

  • Please consider misspellings
  • Try different search keywords

カスタムログインページの使用


必要なユーザ権限
Visualforce ページを作成し編集する 「アプリケーションのカスタマイズ」
Apex クラスを編集する 「Apex 開発」

および

「アプリケーションのカスタマイズ」

社外のコミュニティメンバーに、自分の組織のスタイルとブランドを反映した完全なカスタムログインページを提供できます。VisualforceApex を使用して、SiteLogin ページと SiteLoginController をカスタマイズするか、独自の Visualforce ページを作成します。

デフォルトのコミュニティログインページからカスタムログインページにリダイレクトする手順は、次のとおりです。

  1. [設定] で、[開発] | [Apex クラス] をクリックします。
  2. CommunitiesLoginController の横にある [編集] をクリックします。
  3. 次のコードを追加します。
    1global PageReference forwardToCustomAuthPage() {
    2        String startUrl = System.currentPageReference().getParameters().get('startURL');
    3        return new PageReference(Site.getPrefix() + '/SiteLogin?startURL=' + EncodingUtil.urlEncode(startURL, 'UTF-8'));
    4    }
  4. 完全なカスタムログインページを作成したら、SiteLoginVisualforce ページの名前で置き換えます。
  5. [保存] をクリックします。
  6. CommunitiesLandingController の横にある [編集] をクリックします。
  7. 次のコードを追加します。
    1public PageReference forwardToCustomAuthPage() {
    2        String startUrl = System.currentPageReference().getParameters().get('startURL');
    3        return new PageReference(Site.getPrefix() + '/SiteLogin?startURL=' + EncodingUtil.urlEncode(startURL, 'UTF-8'));
    4    }
  8. 完全なカスタムログインページを作成したら、SiteLoginVisualforce ページの名前で置き換えます。
  9. [保存] をクリックします。
  10. [設定] で、[開発] | [ページ] をクリックします。
  11. CommunitiesLogin の横にある [編集] をクリックします。
  12. コードの第 1 行に、次のコードを追加します。
    1action="{!forwardToCustomAuthPage}"
  13. [保存] をクリックします。
  14. CommunitiesLanding の横にある [編集] をクリックします。
  15. コードの第 1 行に、次のコードを追加します。
    1action="{!forwardToCustomAuthPage}"
  16. [保存] をクリックします。