I just tried the base example Visualforce page:

  <!-- Begin Default Content REMOVE THIS -->
  This is your new Page
 <!-- End Default Content REMOVE THIS -->

and there is no header or sidebar on the preview, just the content. I thought that the header & sidebar were automatically set to be visible - what am I missing?


4 Answers 4


Those two should show by default, though the sidebar might be hidden for your user.

Add the following to the page declaration to explicitly show them.

<apex:page sidebar="true" showHeader="true">

You can get all the info on the apex:page tag here

  • Thanks @Sebastian - per my comment above, adding sidebar="true" and showHeader="true" have no effect. Is there a user setting that would override these values (seems odd if you explicitly set them that they would still be overridden)
    – dbcn
    Commented Feb 22, 2017 at 14:00
  • Are you displaying this page in Lightning, by any chance? Commented Feb 22, 2017 at 16:42
  • I believe so - I just signed up for a Developer account, and the url includes lightning.force.com
    – dbcn
    Commented Feb 22, 2017 at 18:49
  • Header/Sidebars will NEVER show in Lightning (like you see in the post that @Oleksiy made). Switch to Classic and they should work Commented Feb 22, 2017 at 18:56
  • 1
    Ah... that makes more sense - the documentation seems like you are creating a full page rather than a page element. I literally clicked to create a new VF page, then clicked the preview button, and only saw the page content. Thanks for the help!
    – dbcn
    Commented Feb 22, 2017 at 20:27

In Salesforce classic the showHeader="true" and sidebar="true" attributes on the <apex:page> element enable both the header and sidebar.

In Salesforce lightning these values are automatically overridden. You can still enable them by using the setup="true" attribute on the <apex:page> element this enables both the header and sidebar.


Visualforce Developer Guide says:

showHeader Boolean value that specifies whether the Salesforce tab header is included in the page. If true, the tab header is displayed. If not specified, this value defaults to true.

Note: In Lightning Experience and Salesforce1 the value of this attribute is overridden, and is always false.

  • Thanks @Olesky, but adding showHeader="true" and sidebar="true" yield the same result (no header or sidebar).
    – dbcn
    Commented Feb 22, 2017 at 13:58

I was able to do this by adding the setUp = "true" attribute to the tag


You must log in to answer this question.

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