Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

Anyone know how to emulate this using visualforce? Is there some sort of global variable commands to get the icon? or am i forced to cssing this all? I am just looking to get the top portion where the contact and contact.Name is. Thanks been trying to make a VF page that looks identical to the ones that salesforce provides.

share|improve this question
up vote 4 down vote accepted

To get the title and subtitle (in your example, "Contact" and "CT-0000000001"), use apex:sectionHeader. To get the icon and coloring, use the corresponding standardController on the page (in conjunction with apex:sectionHeader), putting any custom controller logic in a controller extension. For example:

<apex:page standardController='Contact' title='Contact - {!}'>
     <apex:sectionHeader title='Contact' subtitle='{!}'>
         <!-- you can add additional header content here if needed, for example, the 
              top-of-page help text on the Convert Lead page -->
         <!-- rest of your page logic -->
share|improve this answer
To get the icon and the coloring you can also explicitly set the tabStyle attribute on the page tag with the name of the object whose look you're trying to mimic, which will set the CSS to match that object's look and feel. <apex:page tabStyle="Contact"> – Mark Pond Feb 19 '14 at 16:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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