I've managed to hack up a solution, but YMMV.
My requirement was to display Account related details, but it's a refactored Case view page, therefore it is using standard Case controller with extension.
Essentially you need a container page that checks if id is present. If not, render VF page and get the id via JS, then redirect to intended footer page. If id is already present - redirect to footer via Apex.
Container page:
<apex:includeScript value="/support/console/37.0/integration.js"/>
<script type="text/javascript">
var pageLoad = window.onload;
window.onload = function() {
if (pageLoad) {
pageLoad();
}
testGetFocusedPrimaryTabId();
}
function testGetFocusedPrimaryTabId() {
sforce.console.getFocusedPrimaryTabObjectId(showTabId);
}
var showTabId = function showTabId(result) {
document.location.href='/apex/ConsoleFooter?accountid='+result.id;
};
</script>
Container controller:
public with sharing class ConsoleFooterContainer {
public pagereference redir(){
if ( System.currentPageReference().getParameters().get('id') == null )
return null;
else
return new pagereference ('/apex/ConsoleFooter?id=' + System.currentPageReference().getParameters().get('id'));
}
}
Finally in my extension constructor, I am getting the accountId and doing some checks if case id is present.
case current;
if ( controller.getId() != null )
current = [select accountid, parent.accountid
from case
where id =:
controller.getId()];
id accountId = ( current != null ) ?
( current.accountId == null ) ? current.parent.accountId : current.accountId :
System.currentPageReference().getParameters().get('accountid');
// retrieve main record
account a = [select id, name, foo__c from account where id=: accountid];
It's takes an extra few seconds on new case screen, but works. Let me know if you need any help! Cheers.