1

BACKGROUND

I'm implementing the Salesforce Lightning Community. I have 2 community pages with 2 different custom layouts (implementing the forceCommunity:themeLayout interface). I'm facing the issue related to the reloading of the Theme Component during the next redirection during pages.


PAGE A

Page A is using the Theme A theme component and the following components are added to the Content section in the Community Builder:

  • Component X
  • Component Y
  • Component Z

The Theme A component has the {!v.Body} placed inside the aura:if block that checks the condition.

  • If the condition is true then display body and stay on the current page
  • If the condition is false then redirect from Page A to Page B

PAGE B

Page B is using the Theme B theme component.

The Theme B component is checking the same condition (as Theme A) but the behavior is different:

  • If the condition is true then redirect from Page B to Page A
  • If the condition is false then stay on the current page and display the button that can change the condition to true and redirect to page A

ISSUE

  1. User enters Page A - the condition is false so the v.Body is hidden by aura:if
  2. User is being redirected to Page B - the condition is false so the button to change the condition is being displayed
  3. User clicks the button - the condition is being changed to true
  4. User is being redirected to Page A - the redirection spinner is still running, the init() event of the Theme A is not being called again, the page is not being loaded. User needs to refresh the page manually and then the condition is true, Page A is being loaded correctly.

QUESTIONS

  • Any ideas why the Theme A is not being fully reloaded during navigating back to the page that is using that?
  • Any ideas on how to force re-load of this component?
  • IMO it's related to the v.Body placed inside the aura:if on the Theme A - can it be replaced with something?

0

You must log in to answer this question.

Browse other questions tagged .