function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BrettGusBrettGus 

Mimic salesforce standard pages style

I'm just starting out with visualforce here... but I'd really like to make my own account page from scratch except using the new theme. However, when I make a VF account page page with the standard controller... it looks completely different from an actual account page.  Am I missing something?

Best Answer chosen by Admin (Salesforce Developers) 
goabhigogoabhigo

To make it exactly same as standard Salesforce look-and-feel use the following in addtion to what Kevin said:

 

<apex:page standardController="Accounts">
<apex:form >
<apex:sectionHeader subtitle="New Account" title="Account Edit"/>
<apex:pageBlock mode="maindetail" title="Account Edit">

If you dont use sectionHeader the image of account(or icon[a folder]) wont come in your VF page.

This will definitely help you, I hope.

All Answers

Kevin SwiggumKevin Swiggum

 

If you're using apex:page block, by default it's going to have the gray background and color border. If you want it to look more like the standard, you can add mode="maindetail" to the pageblock tag.

e.g.

<apex:pageblock mode="maindetail" title="blah">

 

That will change the layout to the white background and no border...just like the standard layout.

goabhigogoabhigo

To make it exactly same as standard Salesforce look-and-feel use the following in addtion to what Kevin said:

 

<apex:page standardController="Accounts">
<apex:form >
<apex:sectionHeader subtitle="New Account" title="Account Edit"/>
<apex:pageBlock mode="maindetail" title="Account Edit">

If you dont use sectionHeader the image of account(or icon[a folder]) wont come in your VF page.

This will definitely help you, I hope.

This was selected as the best answer
BrettGusBrettGus

Both of those suggestions were helpful.  Thanks guys

Saurabh DhobleSaurabh Dhoble

For future reference, I put the entire code for creating a custom account edit page on my blog. You can just copy-paste the code from this post.