I am trying to overwrite the standard buttons on a standard object with an embedded VF page. The reason for this is that I want a custom button to be conditionally rendered based upon a field in the record. I get the buttons to display, but when I click them they open within the detail page of the record. How do I get them to open over the existing page like standard buttons normally do?
<apex:page standardController="Contract" >
<apex:form >
<div style="text-align: center">
<apex:commandButton value="Edit" action="{!Edit}"/>
<apex:commandButton value="Delete" action="{!Delete}"/>
<apex:commandButton value="Clone" action="{!URLFOR($Action.Contract.Clone,Contract.id)}"/>
<apex:commandButton value="Amend" OnClick="window.open('/apex.VF_Quote');"/>
</div>
</apex:form>
</apex:page>