I have below code to open visualforce page from lightning component. But if i open vf page from lightning showHeader should set it as false. Is it possible to achieve this?


1 Answer 1


Not directly, but you could use a page parameter:

<apex:page showHeader="{!$CurrentPage.parameters.showHeader != 'false'}">

Which you can then set via a URL parameter:

  • This seems to be not working. window.open('/apex/OpenVFPage?showHeader=false'); Dec 29, 2017 at 17:09
  • i need to use only window.open code but somehow i need to make showHeader=false Dec 29, 2017 at 17:18
  • 1
    @ChaithraKN You need to allow the page to accept the parameter. You'll need to modify your page as I demonstrated. If you can't, you might want to look in to using isdtp=mn, but this will have other side effects as well.
    – sfdcfox
    Dec 29, 2017 at 17:34
  • I updated page to have showHeader="{!$CurrentPage.parameters.showHeader != 'false'}" . It started working. Thanks for your help. If i use isdtp=mn what may be the side effects? Dec 29, 2017 at 17:39
  • @ChaithraKN It also changes the style sheets slightly. You can choose whichever method you prefer.
    – sfdcfox
    Dec 29, 2017 at 17:40

You must log in to answer this question.

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