function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Site Login Page

Hey Guys,


I have configured sites to use our Customer Portal.


We want to use the custom siteLogin VF page. is it possible to use that login page only and have ti send the users to our standard customer portal after login? Or are the sessions not compatible?

Shashikant SharmaShashikant Sharma

You can use your own custom site login page. You will see a sitelogin page created automaticaly when you configure a site. You can use that page or create your new one.


What you're wanting to do is possible. You can use the default one that's created when you create the customer portal, but it's definitely ugly. If you want to create your own custom one, you'll have to use Salesforce Sites. What you'll have to do is


1) create the site

2) In the site enable login for the particular customer portal you're wanting (You can do this via the "Login Settings" button (next to "Public Access Settings") when viewing the Site in setup

3) After you've enabled login for the particular customer portal, you're going to have to give the visualforce pages, custom objects, and respective classes (including the controllers for the visual force pages) access to the whatever the user needs permissions for to run the Homepage from your customer portal. You can do this via "Public Access Settings" and then scroll to the bottom and edit the list of Enabled Apex Classes and Enabled Visualforce Page Access.

4) Note that the login controller and the visualforce login page also have to be given access in the above step (otherwise you'll get an unauthorized access notification).

5) Make sure that you set your Active Homepage to be the Visuaforce page that you want to be the landing page of your Customer Portal

6) If you don't care about the customized look of your login page, you can use their default SiteLoginTemplate, otherwise, specify your VF page here.


From there you should be good.


If in the event you want to customize the look of your login page, I would suggest creating a new visualforce page. From there, add a new component that has the login elements you need (styled to match your new page -- more info here) and you'll be off to the races.