Skip to content

Instantly share code, notes, and snippets.

@pgregorynz
Last active August 29, 2015 14:08
Show Gist options
  • Save pgregorynz/62bcdb92d76bbbbd035e to your computer and use it in GitHub Desktop.
Save pgregorynz/62bcdb92d76bbbbd035e to your computer and use it in GitHub Desktop.
A better Umbraco Preview Mode Indicator
<!--
replace the previewBadge element in the umbracosettings.config
This will give you a green fixed banner across the bottom of the screen.
It adds 50px to the bottom of page to ensure the banner
doesnt mess with your design. It also has a high z-index so it will work properly in most situations.
-->
<PreviewBadge><![CDATA[
<div style="width:100%; height:50px;">
<a id="umbracoPreviewBadge" style="position: fixed; z-index:1000; width:100%; background: #00cc00; bottom:0;left:0;padding:15px" href="{0}/endPreview.aspx?redir={2}">
<span style="display:block; font-size:1.5em; font-weight:bold; color:#ffffff; text-align:center;">In Preview Mode - click to end</span>
</a>
</div>
]]></PreviewBadge>
@pgregorynz
Copy link
Author

replace the previewBadge element in the umbracosettings.config This will give you a green fixed banner across the bottom of the screen. It adds 50px to the bottom of page to ensure the banner doesn't mess with your design. It also has a high z-index so it will work properly in most situations. Enjoy :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment