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 System.Text; | |
using System.Threading.Tasks; | |
using Sitecore; | |
using Sitecore.Configuration; | |
using Sitecore.Data; | |
using Sitecore.Data.Fields; | |
using Sitecore.Data.Items; |
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 bool Implements(this Item item, params ID[] templateIds) | |
{ | |
if (templateIds.Length == 0) | |
{ | |
throw new ArgumentOutOfRangeException("templateIds", "must include at least one template"); | |
} | |
if (item == null || item.Template == null) | |
{ | |
return false; | |
} |
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 Landmark | |
{ | |
public string Id { get; set; } | |
public string Title { get; set; } | |
public string Latitude { get; set; } | |
public string Longitude { get; set; } | |
public string Distance { get; set; } | |
} | |
public class LandmarkController : ApiController | |
{ |
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
{ | |
"proxy": "http://IP:port/", | |
"https-proxy": "http://IP:port/", | |
"strict-ssl": false | |
} |
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.Text; | |
using Sitecore; | |
using Sitecore.Data.Items; | |
using Sitecore.Globalization; | |
using Sitecore.Web.UI.HtmlControls; | |
using Sitecore.Web.UI.Sheer; | |
//https://jammykam.wordpress.com/2015/10/05/webforms-for-marketers-allow-selection-of-existing-forms/ | |
namespace LendLease.Extension.Sc.WFFM |
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
//references https://github.com/hermanussen/sitecore-html-crawler | |
public class HtmlCrawledField : IComputedIndexField | |
{ | |
public string FieldName { get; set; } | |
public string ReturnType { get; set; } | |
public object ComputeFieldValue(IIndexable indexable) | |
{ | |
Assert.ArgumentNotNull(indexable, "indexable"); |
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
//references | |
//http://www.sitecore.net/Learn/Blogs/Technical-Blogs/John-West-Sitecore-Blog/Posts/2013/05/Sitecore-7-Enable-Default-Computed-Index-Fields.aspx | |
//http://kamsar.net/index.php/2014/05/indexing-subcontent/ | |
//http://www.techphoria414.com/Blog/2013/November/Sitecore-7-Computed-Fields-All-Templates-and-Datasource-Content | |
public class SubcontentField : IComputedIndexField | |
{ | |
public string FieldName { get; set; } | |
public string ReturnType { 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 class ByLocalSearchNoResult : PageEventDimensionBase | |
{ | |
private readonly Guid noSearchHitsFoundId = AnalyticsIds.NoSearchHitsFound.Guid; | |
public ByLocalSearchNoResult(Guid dimensionId) : base(dimensionId) | |
{ | |
} | |
public override bool Filter(PageEventData pageEventData) | |
{ | |
Assert.IsNotNull((object)pageEventData, "pageEvent"); |
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
<%@ page language="C#" async="true" autoeventwireup="true" codebehind="FixClonedItems.aspx.cs" inherits="Web.sitecore.admin.Migration.FixClonedItems" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Migartion Fix Cloned Items</title> | |
<style type="text/css"> | |
body { | |
font-family: normal 11pt "Times New Roman", Serif; | |
} |
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 container = new UnityContainer(); | |
container.RegisterTypes(AppDomain.CurrentDomain.GetAssemblies().SelectMany(x => x.GetTypes())); | |
container.RegisterTypes(AllClasses.FromLoadedAssemblies()); | |
container.RegisterInstance(typeof(UmbracoHelper), new UmbracoHelper(UmbracoContext.Current)); | |
container.RegisterInstance(typeof(UmbracoContext), UmbracoContext.Current); | |
container.RegisterInstance(typeof(Merchello.Core.IMerchelloContext), MerchelloContext.Current); | |
container.RegisterInstance(typeof(ApplicationContext), ApplicationContext.Current); | |
container.RegisterInstance(typeof(ServiceContext), ApplicationContext.Current.Services); |
OlderNewer