Last active
July 6, 2022 15:44
-
-
Save fluxdigital/d8ff46b46ac2a6c4b6150c89144edb82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
### 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