0

I have a vf page which needs to be visible in both classic and lightning experience. I added lightningStyleSheets="true" to enable lightning kind of styling in lightning experience for the page.

However, when the page is viewed in lightning experience, the sidebar and header get disappeared. I checked for it, so it's because the lightning experience overrides the sidebar and showheader to false by default. But how can we make this available in the lightning experience? I tried with "setup = true" . But this enables setup bar in classic only, and when tried in lightning experience, the classic setup gets visible. Has anyone worked on this?

enter image description here

  • 1
    Try to construct the final url something like (/one/one.app#/alohaRedirect/apex/GlobalKYCView) in lightning. – Vinay Oct 5 '20 at 6:51
3

Lightning Experience Header and Navigation Menu Can’t Be Suppressed

Visualforce pages always display with the standard Lightning Experience user interface when they run in Lightning Experience. There’s no way to suppress or alter the Lightning Experience header or sidebar. In particular, the showHeader and sidebar attributes of apex:page have no effect on Visualforce pages when displayed in Lightning Experience . This behavior is intentional. Apps that display in Lightning Experience are Lightning Experience apps. If you need to provide a completely custom interface for your app, you’ll need to run it in Salesforce Classic.

Salesforce Classic Header and Sidebar Are Always Suppressed

The standard Salesforce Classic header and sidebar are always suppressed for pages when they’re displayed in Lightning Experience. In particular, the showHeader and sidebar attributes of apex:page have no effect on Visualforce pages when displayed in Lightning Experience. Pages behave as though the showHeader and sidebar attributes of apex:page are both set to false.

Reference: - Know Which Features to Avoid in Lightning Experience

  • Even the lightning headers won't be visible? I don't want the classic header to appear there. – Pankaj Andhale Oct 5 '20 at 6:25
  • Lightning Experience Header and Navigation Menu Can’t Be Suppressed. So Lightning Experience header can't be removed. – sanket kumar Oct 5 '20 at 6:27
  • But for my page, the header is not available. It is just showing the VF page content with no headers – Pankaj Andhale Oct 5 '20 at 6:32
  • please add a screenshot and also how are you loading the vf page? – sanket kumar Oct 5 '20 at 6:33
  • I was doing the wrong thing I guess, After switching to lightning experience, I was trying to refresh the page. Because the URL seems to be of classic .Maybe I need to change the redirection code to adust for both lightning experience and classic? – Pankaj Andhale Oct 5 '20 at 6:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.