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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Sitecore.Data.Items; | |
using Sitecore.Diagnostics; | |
using Sitecore.Web.UI.HtmlControls.Data; | |
namespace MyProject.CMS.Custom.Controls | |
{ | |
public class QueryableTreelist : Sitecore.Shell.Applications.ContentEditor.TreeList |
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
$VerbosePreference = "Continue" | |
$newUsersFile = Receive-File -Path "C:\temp\upload" -CancelButtonName "No, I will do it using MS Excel instead" | |
$newUsers = Import-Csv -Path $newUsersFile | |
foreach($user in $newUsers) { | |
Write-Verbose "Creating User: $($user.Username)" | |
New-User -Identity $($user.Username) -Enabled -Password $($user.Password) -Email $($user.Email) -FullName "$($user.Name)" | |
$($user.Roles).Split(",") | ForEach { |
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 System.Web; | |
using Sitecore.Diagnostics; | |
using Sitecore.Resources.Media; | |
using System; | |
using System.Linq; | |
using Sitecore.Data.Items; | |
using Sitecore.IO; | |
namespace MyProject.Custom.Media | |
{ |
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 System.Configuration; | |
using System.Xml; | |
using Sitecore; | |
using Sitecore.Configuration; | |
using Sitecore.Diagnostics; | |
namespace MyProject.Custom | |
{ | |
class ConfigReader : Sitecore.Configuration.ConfigReader | |
{ |
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
$tempFolder = [Sitecore.Update.Utils.FileUtils]::InstallationHistoryRoot | |
$historyFolder = [Sitecore.MainUtil]::MapPath($tempFolder) | |
#get the latest update folder | |
$latestUpdate = Get-ChildItem -Path $historyFolder | Sort-Object LastAccessTime -Descending | Select-Object -First 1 | |
Write-Host $latestUpdate.FullName | |
[Sitecore.Update.Engine.PackageGenerator]::ConvertRollbackPackage( ` | |
$latestUpdate.FullName + "\rollbackPackage.rlb", ` | |
$latestUpdate.FullName + "\rollbackPackage.update") |
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 System.ComponentModel; | |
using System.IO; | |
using System.Linq; | |
using System.Xml.Linq; | |
using HedgehogDevelopment.SitecoreProject.PackageInstallPostProcessor.Contracts; | |
using Sitecore.Diagnostics; | |
namespace ForwardSlash.TDS.PostDeploy | |
{ | |
[Description("Generate anti-update rollback package for latest deployment.")] |
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; | |
using Sitecore.Diagnostics; | |
using Sitecore.Resources; | |
using Sitecore.Web.UI; | |
using Telerik.Web.UI; | |
using Sitecore.Data.Items; | |
namespace RTEDropList | |
{ | |
public class EditorConfiguration : Sitecore.Shell.Controls.RichTextEditor.EditorConfiguration |
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.Pipelines.RenderField; | |
namespace MyProject.CMS.Custom.Pipelines.RenderField | |
{ | |
public class ShowTitleWhenBlank | |
{ | |
public void Process(RenderFieldArgs args) | |
{ | |
args.RenderParameters["show-title-when-blank"] = "true"; | |
} |
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
Sitecore.PageModes.ChromeControls = Sitecore.PageModes.ChromeControls.extend({ | |
renderCommandTag: function (command, chrome, isMoreCommand) { | |
var tag = this.base(command, chrome, isMoreCommand); | |
if (command.click.indexOf("chrome:") == 0) { | |
if (command.type == "common" || command.type == "datasourcesmenu" || command.type == "workflow") { | |
tag.click(function (e) { | |
e.stop(); | |
}); | |
} |
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 System; | |
using System.Linq.Expressions; | |
using System.Web; | |
using System.Web.Mvc; | |
using Glass.Mapper.Sc; | |
namespace MyProject.Custom.HtmlHelpers | |
{ | |
public static class GlassEditFrameExtensions | |
{ |