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
Steve W.ax1365Steve W.ax1365 

Formatting Visual Force Page displayed in Home Page component HTML Area

New to visual force and haven't used HTML in years so i'm having a hard time figuriring out how to make this look good.

 

Essentially i am creating a table of dynamic report links to be placed on a users homepage.  In order to leverage the ?pv0={!$User.Id} parameter in an HTML area within the home page i have to first use a visual force page to encode the links then represent this VF page using an iframe in the HTML hompage component.  Got that working so now the reports receive the current User.Id parameter but am struggling to modify the appearance.

 

here is the VF code i have managed to kludge together.

 

<apex:page standardStylesheets="true" showheader="false" sidebar="false" >
<apex:outputText >Welcome to Salesforce</apex:outputText><br></br>
<apex:outputtext >Below you will find all the information you require</apex:outputtext>

<apex:panelGrid id="theGrid" columns="2" border="4" cellpadding="4" cellspacing="6" style="Theme3">
<apex:outputLink value="/00OJ0000000FGuz?pv0={!$User.Id}" target="_blank" style="Theme1" id="theLink">My Awesome Custom Report</apex:outputLink>
<apex:outputLink value="/00OJ0000000FGuz?pv0={!$User.Id}" target="_blank" id="theLink2">My Awesome Custom Report 2</apex:outputLink>
<apex:outputLink value="/00OJ0000000FGuz?pv0={!$User.Id}" target="_blank" id="theLink3">My Awesome Custom Report 3</apex:outputLink>
<apex:outputLink value="/00OJ0000000FGuz?pv0={!$User.Id}" target="_blank" id="theLink4">My Awesome Custom Report 4</apex:outputLink>
</apex:panelGrid>
</apex:page>

 

The HTML Area home page compoenent is this:

 

<iframe src="/apex/My_RIM_Programs" height="200px" width="500px"></iframe>

 

Can anyone assist me with making the appearance of this visual force page match that of the home page where it will be utilized? I've spent time searching through the help and have found a number of references to standard CSS available within salesforce but am really struggling with how to implement these styles within the VF page and what variables i.e. "Theme2", "Theme3" to use.

 

Thanks

cmlcml

I am not sure how to copy look and feel of Home page but here is one option which you can try.

Create a custom visualforce tab and select the style which you want to use and then use that tab style in your page.

In your page you have to modify <ape:page> declaration and add following attribute :

 

<apex:page ........other attributes....................tabStyle="<your tab name>__tab">

 

I hope this helps.