[SalesForce] How to create a custom login page in Lightning using Napili template

Napili automatically assigns login to its own Login page. The template does not appear to allow use of a Custom Login page. Also, the assigned Login page does not import the CMS Connect headers and footers. I need to be able to either customize the login page template to include the CMS Connect content or assign the login to a custom page of my choosing that uses the Customer service template.

Best Answer

You don't create your own login page, you modify the existing one by using your own components and (if you like) your own theme and layout.

See https://help.salesforce.com/articleView?id=networks_custom_login_self_reg_lightning.htm&type=5

Each community comes with a default set of Login pages: Check Password, Forgot Password, Login, Login Error, Register. Each has a standard Lightning component that drives this functionality. You can add code logic to customize the login experience per your company and community’s requirements.

From Setup, enter Lightning Components in the Quick Find box, then select Lightning Components under Develop. From the list of components, click on the one you want to customize. For example, to customize the login experience, click loginForm. On the Lightning component detail page, click Developer Console. Follow the instructions in the code to expose the component in Community Builder. Add custom code logic and save your changes as a new custom component. Go back to Community Builder in your community and bring up the Login page from the list of pages. The custom component you created should display in the list of components.