We have a lightning community for partner registrations with users from multiple profile types. We need to change the contents of the Home page based on the current logged in user. Currently I'm doing it by a VF pages; [I have a VF page component on the main page of my Lightning community template]. This main VF page will redirect to another VF page based on the current user. This works fine. But I want to do the same with lightning components. So that I will have a main component and that will redirect/render to another component based on the current user. Can I do this? Please share any lead

2 Answers 2


You can use Audience Targeting.

There is step-by-step process in Salesforce Documentation: Manage Audience Targeting for Pages and Groups in Communities.

  • Thanks! it will somewhat helps me. But what if I want to display a different page for same profile based on some criteria? For example the current accounts status? one page if its 'new', and another one if its 'completed'? Sep 2, 2018 at 12:41
  • 2
    Then you would need a custom layout that validates your criteria serverside and add conditional rendering
    – glls
    Sep 2, 2018 at 12:47
  • I understood the validate serverside via controller. Can you elaborate more about adding custom layout? Sep 2, 2018 at 12:53
  • You would do that in Lightning Component. (I guess that's what @glls meant by saying custom layout) Sep 2, 2018 at 13:04

Always try and leverage Audience targeting first, however, if you need to further customize what is displayed in your page, you should create either a custom Theme Layout or community Layout. The difference being that the Cusotm Theme layout allows you to modify the whole community Theme (header, footer, body...) and the Layout only the Body of a page in a theme layout.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .