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
DesaiDesai 

How to change the landing page in community

Hi,

We need to change the default landing page on community from Home to Case List view . How to do we do it ?


Regards,
Desai
Khan AnasKhan Anas (Salesforce Developers) 
Hi Desai,

Greetings to you!

Please refer to the below links which might help you further with the above requirement.

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

https://blog.webnersolutions.com/change-landing-page-of-community-website

https://salesforce.stackexchange.com/questions/186253/communities-cannot-change-home-page-to-my-custom-community-builder-page

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Ajay K DubediAjay K Dubedi
Hi Desai,

You can change the default landing page in CommunitiesLandingController. CommunitiesLandingPage is the Active Site Home Page for your community, meaning that it is shown when someone enters a direct URL to your community.

Here are the steps to update the CommunitiesLandingController code to redirect to the new page:

    - Click Setup.
    - Enter Apex classes in quick find box and click it.
    - Find CommunitiesLandingController and click Edit.
    - The default code of CommunitiesLandingController below:
    
    /**
 * An apex page controller that takes the user to the right start page based on credentials or lack thereof
 */
public with sharing class CommunitiesLandingController {
    // Code we will invoke on page load.
    public PageReference forwardToStartPage() {
        return Network.communitiesLanding();
    }    
    public CommunitiesLandingController() {}
}

The new code will be:-
/**
 * An apex page controller that takes the user to the right start page based on credentials or lack thereof
 */
public with sharing class CommunitiesLandingController {
    
    // Code we will invoke on page load.
    public PageReference forwardToStartPage() {
    String communityUrl = 'https://google.com'; //URL of new page
     return new PageReference(communityUrl);   
   }
    
    public CommunitiesLandingController() {}
}

    - At last Click Save
    
    
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks,
Ajay Dubedi    
Donny HouckDonny Houck
Does the udpaetd code also mean an updated test script.  We're continuing to fail the code coverage during a deploy from Sandbox to Production
Stefani Petrovska 19Stefani Petrovska 19
If having standard Login page, you can use the following setting on the Login Form component (example):
User-added image