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
Jim BoudreauxJim Boudreaux 

PageBlock renders with old Style Look and Feel

When I use pageblocks and pageblocksections and outputfields, etc, I do not get the new Salesforce Look and Feel that I get when I view a standard SF page or when I use <apex:detail/>.

 

Why is that? Is there a way around that?

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

Set your pageblock mode attribute to "maindetail" and you'll pick up the new theme, otherwise it defaults to "detail" which is the old one.

All Answers

stephanstephan

Can you provide sample code? Also, what browser are you using?

Jim BoudreauxJim Boudreaux

 

<apex:page standardcontroller="Contact">
   <apex:detail/>
   <apex:pageblock>
      <apex:pageblocksection title="Info">
         <apex:outputfield value="contact.name"/>
      </apex:pageblocksection>
   </apex:pageblock>
</apex:page>

 The above code will render a standard looking SF record page, followed by a small older looking section.

 

I encounter this regardless of the browser, but if you must know, I use Safari and Chrome on a Mac, an I've seen the same effect on chrome, IE, and FF on a PC.

I cannot speak to how Opera handles it. (PC or on a Wii)

 

bob_buzzardbob_buzzard

Set your pageblock mode attribute to "maindetail" and you'll pick up the new theme, otherwise it defaults to "detail" which is the old one.

This was selected as the best answer
Jim BoudreauxJim Boudreaux

Excelsior! Thanks Bob!