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
/////// FROM /////// | |
protected virtual XDocument BuildXmlDocument(IEnumerable<XElement> pages) => new XDocument(new XDeclaration("1.0", "UTF-8", "no"), new object[1] | |
{ | |
(object) new XElement(SitemapGenerator.ns + "urlset", new object[2] | |
{ | |
(object) new XAttribute(XNamespace.Xmlns + "xhtml", (object) (XNamespace) "http://www.w3.org/1999/xhtml"), | |
(object) pages | |
}) | |
}); |
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
$dialogProps = @{ | |
Title = "Version Lister" | |
Description = "The dialog allows the selection whether to see all versions or only the latest" | |
Width = 500 | |
Height = 100 | |
OkButtonName = "OK" | |
CancelButtonName = "Cancel" | |
Parameters = @( | |
@{ Name = "onlyLatest"; Value=$true; Title="Show only latest versions"; Editor="checkbox"; } | |
) |
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
public class ShellDefaultPageExtension : Sitecore.Shell.DefaultPage | |
{ | |
protected override void OnInit(EventArgs e) | |
{ | |
base.OnInit(e); | |
var control = this.Controls[0]; | |
var page = control.Page; |
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
public class CmsNotificationManager | |
{ | |
private static Dictionary<string, string> EventMessages; | |
public static void Initialize() | |
{ | |
EventMessages = new Dictionary<string, string>(); | |
Database database = Factory.GetDatabase("master"); |
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
public class InitializeCmsNotification | |
{ | |
public void Process(PipelineArgs args) => CmsNotificationManager.Initialize(); | |
} |
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
using Sitecore.Events; | |
using Sitecore.Install.Events; | |
using System; | |
public class PackageInstallationEvent | |
{ | |
public void OnPackageInstallItemsEndHandler(object sender, EventArgs e) | |
{ | |
if (e == null) | |
{ |
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
public class InitializeCmsNotification | |
{ | |
public void Process(PipelineArgs args) => CmsNotificationManager.Initialize(); | |
} |
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
using Sitecore.Events; | |
using Sitecore.Experiment.Notification.Models; | |
using Sitecore.Web.UI.Sheer; | |
using System; | |
public class CmsNotificationManager | |
{ | |
private static bool _initialized; | |
private static readonly object globalLock = new object(); |
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
using Sitecore.Data.Events; | |
using Sitecore.Events; | |
using Sitecore.Experiment.Notification.Models; | |
using Sitecore.Shell.Applications.ContentManager; | |
using Sitecore.Web.UI.Sheer; | |
using System; | |
public class ContentEditorExtension : ContentEditorForm | |
{ | |
protected override void OnLoad(EventArgs e) |
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
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/"> | |
<sitecore> | |
<events> | |
<event name="packageinstall:items:ended"> | |
<handler type="YourNamespace.ItemPackageEvent, YourAssemblyName" method="OnPackageInstallItemsEndHandler" /> | |
</event> | |
</events> | |
</sitecore> | |
</configuration> |