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
$item = Get-Item . | |
Remove-Item $item.Paths.FullPath -Recurse |
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 (Speak) { | |
Speak.pageCode(["sitecore", "jquery"], function (sitecore, $) { | |
return { | |
initialized: function () { | |
//set the dialog window visibility here | |
this.DialogWindow.hide(); | |
}, | |
triggerDelete: function () { |
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
var homeItem = db.GetItem(new ID("{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}")); | |
TrackingField trackingField; | |
ProfileUtil.GetProfiles(homeItem, out trackingField); | |
TagProfile(trackingField, homeItem); |
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
private void TagProfile(TrackingField trackingField, Item item) | |
{ | |
var trackingValue = item.Fields["__Tracking"].Value; | |
var editorial = trackingField.Profiles.FirstOrDefault(p => p.Name.Equals("Editorial")); | |
if (editorial != null) | |
{ | |
var editorialProfileItem = new ProfileItem(editorial.GetProfileItem()); |
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
private List<string> ProfileCards = new List<string> { "{A7D2A5CA-9C01-4D37-A723-DECB23AE32BE}", "{3D34DCD2-D3B8-4BE7-A2F8-63C7F2570153}", "{33AF4F2F-75AF-4755-9533-AD4EF077C54C}" }; | |
private List<PresetInfo> GetProfileCard(ProfileItem profileItem) | |
{ | |
var presetInfoList = new List<PresetInfo>(); | |
foreach (var profileCard in ProfileCards) | |
{ | |
var preset = profileItem.ProfileCards[new ID(profileCard)].InnerItem; |
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
private void SetProfileKeys(ContentProfile profile, ProfileItem profileItem) | |
{ | |
foreach (ProfileKeyItem profileKeyItem in profileItem.Keys.ToList()) | |
{ | |
ProfileKeyItem keyItem = profileKeyItem; | |
if (profile.Keys.FirstOrDefault(k => string.Compare(k.Key, keyItem.Name, StringComparison.InvariantCultureIgnoreCase) == 0) == null) | |
{ | |
ContentProfileKeyData key = new ContentProfileKeyData(keyItem) | |
{ | |
Value = keyItem.GetDefaultValue() |
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 PresetInfo | |
{ | |
public string Details { get; set; } | |
public ID ID { get; set; } | |
public string Name { get; set; } | |
public string ShortID { get; set; } |
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 static void GetEventDefinition(Item item) | |
{ | |
Assert.ArgumentNotNull(item, "item"); | |
var field = item.Fields["__Tracking"]; | |
if (field != null) | |
{ | |
var trackingField = new TrackingField(field); |
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
SELECT TOP 1000 [ID] | |
,[SourceDatabase] | |
,[SourceItemID] | |
,[SourceLanguage] | |
,[SourceVersion] | |
,[SourceFieldID] | |
,[TargetDatabase] | |
,[TargetItemID] | |
,[TargetLanguage] | |
,[TargetPath] |
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 ProcessProfileProcessor : ProcessItemProcessor | |
{ | |
public override void Process(ProcessItemArgs args) | |
{ | |
Assert.ArgumentNotNull((object) args, "args"); | |
foreach (TrackingField trackingParameter in args.TrackingParameters) | |
{ | |
TrackingProcessor.ProcessProfiles(args.Interaction, trackingParameter); | |
} |