Disable Preview Mode On Live Site

by Christopher Bass (Wakefly)
Disable Preview Mode On Live Site preview

Price

$0

Details

Licence:
Free
Works with:
8.2
Version:

Web site

http://www.wakefly.com

Summary

This web part was built to disable Preview Mode on the live site. This ensures that logged-in Editors who are attempting to view changes on the live site, don't accidentally find themselves in Preview Mode (where unpublished changes are visible) just because they were making edits in Pages application in another window.

Description

This web part can be dropped onto a template, most likely the master template, to do the following:

If the user is in Preview Mode, isn't viewing the Transformations or Preview button in Pages application (checked by seeing if the page is using the "/cms/getdoc" permanent-URL construction), and is not in a Postback (so that if you're in the middle of something it isn't interrupted), Then it sets you to Live-Site mode and refreshes the page.