Option 1: Add javascript to preview template
Add this script to the preview template you want to use for previewing Prublisher draft entries:
<script>
var url = window.location.href;
if (url.indexOf('publisher_status') == -1){
if (url.indexOf('?') > -1){
url += '&publisher_status=draft'
}else{
url += '?publisher_status=draft'
}
window.location.href = url;
}
</script>
Only when no publisher status is present in the querystring, it will be added and the page will be refreshed.
Option 2: Change the Fancybox code in Zenbu
Look for the zenbu_index.js
file in /third_party/zenbu/javascript
and look for Fancybox for Live Look
.
Replace this
$(this).fancybox({
'overlayShow' : true,
'centerOnScroll' : true,
'type' : 'iframe',
'width' : '90%',
'height' : '90%',
'autoScale' : true,
'titlePosition' : 'inside'
});
With this
var FancyBoxHref = $(this).attr("href")+"?publisher_status=draft";
$(this).fancybox({
'href' : FancyBoxHref,
'overlayShow' : true,
'centerOnScroll' : true,
'type' : 'iframe',
'width' : '90%',
'height' : '90%',
'autoScale' : true,
'titlePosition' : 'inside'
});
This involves editing code from the Zenbu module. So keep in mind that updating the module will also undo those changes. And it will add the querystring to all live look url.