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 HedgehogDevelopment.SitecoreProject.PackageInstallPostProcessor.Contracts; | |
using System; | |
using System.Collections.Specialized; | |
using System.ComponentModel; | |
using System.IO; | |
using System.Net; | |
using System.Web; | |
using System.Xml.Linq; | |
namespace MyProject.PostDeployActions |
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
function Create-XmlSitemap { | |
<# | |
.SYNOPSIS | |
Generates an XML sitemap. | |
.PARAMETER SiteName | |
The name of the site defintion to generate the sitemap for. If omitted, the site definition matching the host name will be used. | |
.PARAMETER HostName | |
The host name that will appear in URLs. If omitted, the first hostname from the site definition will be used. |
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
$rootItem = Get-Item . | |
if ($rootItem.Appearance.ReadOnly) { | |
Show-Alert "You cannot edit this item because it is protected." | |
return | |
} | |
if (!$rootItem.Security.CanWrite([Sitecore.Context]::User)) { | |
Show-Alert "You do not have write access to this item in order to perform this action." | |
return |