From 3924db26d8af80d4a6e68356e56b2ebceecb0842 Mon Sep 17 00:00:00 2001 From: Igor Date: Fri, 22 Jan 2016 13:02:59 +1300 Subject: [PATCH] Add special flag to CMS preview requests --- admin/javascript/LeftAndMain.Preview.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin/javascript/LeftAndMain.Preview.js b/admin/javascript/LeftAndMain.Preview.js index 1d558873a..0d23d18a9 100644 --- a/admin/javascript/LeftAndMain.Preview.js +++ b/admin/javascript/LeftAndMain.Preview.js @@ -452,6 +452,9 @@ // No state available at all. this.setCurrentStateName(null); } + + // Mark url as a preview url so it can get special treatment + url += ((url.indexOf('?') === -1) ? '?' : '&') + 'CMSPreview=1'; // If this preview panel isn't visible at the moment, delay loading the URL until it (maybe) is later if (this.is('.column-hidden')) {