This file contains hidden or 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 System.Collections.Generic; | |
using System.Linq; | |
using Sitecore.Data; | |
using Sitecore.Data.Items; | |
using Sitecore.Diagnostics; | |
using SitecorePlayground.Common.Interfaces.Adapters; | |
namespace SitecorePlayground.Common.Adapters |
This file contains hidden or 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; | |
using Sitecore.Data.Items; | |
using SitecorePlayground.Common.Adapters; | |
using SitecorePlayground.Common.Interfaces.Adapters; | |
using SitecorePlayground.Common.Interfaces.Providers; | |
namespace SitecorePlayground.Common.Providers | |
{ | |
public class ItemProvider : IItemProvider | |
{ |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
<Title>Extension Method</Title> | |
<Author>Marc Duiker</Author> | |
<Description>Snippet to create an extension method. |
This file contains hidden or 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
<# | |
This function uploads & installs the specified Sitecore update package to the given $SiteUrl. | |
It uses cURL (http://curl.haxx.se/) to post a request to a Sitecore website which has Sitecore Ship installed. | |
Example usage: | |
.\deploy-sitecorepackage.ps1 mysite.dev "C:\Project\Build\Artifacts\1-mysite-templates.update" 60 300 | |
#> | |
Param( | |
[Parameter(Position=0, Mandatory=$true)] |
This file contains hidden or 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
<# | |
This script returns the full path of the curl.exe. | |
#> | |
$curlExe = 'curl.exe' | |
$curlPath = Resolve-Path "$PSScriptRoot\..\tools\curl-7.33.0-win64-nossl\$curlExe" # This is the path on the local dev machine. | |
if (-not (Test-Path $curlPath)) | |
{ | |
# Fall-back to use curl.exe located in the same location as the script. | |
if (Test-Path "$PSScriptRoot\$curlExe") |
This file contains hidden or 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
<!-- EMPTY BUCKET CLEANING JOB | |
This job runs at the set interval time and removes item bucket folders that no longer contain any items. | |
This could be cause by deleting an item from a bucket, which has no other items in it. | |
--> | |
<scheduling> | |
<frequency>00:00:05</frequency> | |
<!-- Adjust the interval and frequency as needed to speed things up on a local dev environment. --> | |
<agent type="Sitecore.Buckets.Tasks.RemoveEmptyBucketFolders" method="Run" interval="00:00:10"> | |
<DatabaseName>master</DatabaseName> | |
</agent> |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
Updates the Workflow and Workflow state fields of content items with the given $workflowID and $workflowStateID values. | |
.DESCRIPTION | |
This script can be used when existing content is not assigned to a workflow and workflow state while it should be. | |
This scenario usually occurs when a workflow is assigned to a template but there is already content created based on a previous version of that template (where the workflow was not yet assigned). |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
Update Workflow and Workflow state of content items which have no workflow set while their templates have the Default workflow field set. | |
.DESCRIPTION | |
This script can be used when existing content is not assigned to a workflow and workflow state while it should be. | |
This scenario usually occurs when a workflow is assigned to a template but there is already content created based on a previous version of that template (where the workflow was not yet assigned). |