I am developing a code for "Use an inline Visualforce page in Record Details Page?". In this example,
InLineController
public class InLineController {
public Contact cont {set; get; }
public Id accRecId;
public Account accRec {set; get; }
public InLineController(ApexPages.StandardController controller){
if(ApexPages.currentPage().getParameters().get('id') != null){
Id id = ApexPages.currentPage().getParameters().get('id');
accRecId = [select id,accountid from contact where id = :id].accountid;
if(accRecId != null){
accRec = [select id,name,accountnumber,annualrevenue from account where id =:accRecId];
}
}
}
}
InLineControllerVFPage
<apex:page standardController="Contact" extensions="InLineController">
<apex:form>
<apex:pageBlock title="My Inline Visualforce page">
<b>Account Name : </b><apex:outputField value="{!accRec.name}" /> <br/>
<b>Account Number : </b><apex:outputField value="{!accRec.accountNumber}" /> <br/>
<b>Annual Revenue : </b><apex:outputField value="{!accRec.annualrevenue}"/><br/>
</apex:pageBlock>
</apex:form>
</apex:page>
The only problem which I face is that I want "My Inline Visualforce page" in a single line. How we can get that ?