Thursday 6 September 2012

Remove the Header and Sidebar - Visualforce

Create a new Visualforce page and call it styled, using the following content:
<apex:page standardController="Account">
    <h1>My Styled Page</h1>
    <p>Great!</p>
</apex:page>
Now add a few attributes to the <apex:page> component. Click Save after adding each one to see the effect:
  1. Add sidebar="false"
  2. Add showHeader="false"
    The header and sidebar have now been removed, showing a much more basic page. You need to go one step further to remove all default Force.com styling.
  3. Add standardStylesheets="false"
This ensures that the platform doesn’t add any styling at all to the page.

No comments:

Post a Comment