Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fluxdigital/d8ff46b46ac2a6c4b6150c89144edb82 to your computer and use it in GitHub Desktop.
Save fluxdigital/d8ff46b46ac2a6c4b6150c89144edb82 to your computer and use it in GitHub Desktop.
<#
### Displays a 'Draft Site' message in Experience Editor ###
.Description
The $text variable below should be edited as required.
#>
$title = "Displaying Draft Site"
$text = "You are viewing the draft (Master DB) version of the site."
$icon = @{$true="Office/32x32/information.png";$false="Applications/16x16/warning.png"}[$SitecoreVersion.Major -gt 7]
$notification = New-Object -TypeName Sitecore.Pipelines.GetPageEditorNotifications.PageEditorNotification -ArgumentList $text, "Warning"
$notification.Icon = $icon
$pipelineArgs.Notifications.Add($notification)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment